IspConfig Client and site lost

Discussion in 'Installation/Configuration' started by kameleon1er, Sep 14, 2020.

  1. kameleon1er

    kameleon1er Member

    I don't know if it's serious, but after my attempts to make pureFtpd work, I realize that in the panel, the first site and client I had created at the installation "subdomain.domain.com" disappeared.

    Yet when I create a new site, the numbering continues; C2, C3..

    When I look in the shell, I always see the old Client and the old directory "site... :
    Code:
    /var/www/clients/client2/web2/web# cd web1_bak_2020_09_13_22_00_02
    Code:
    drwxr-xr-x 2 root root 4.0K Sep 13 22:00 client1
    drwxr-xr-x 5 web1 root 4.0K Sep 13 22:03 client2
    Is there a way to rebuild the bonds, or can I leave it like this?
    I also see that for client1 > root:root while for client2 > web1:root
    a chown -R ?
    Is there a way to rebuild the bonds, or can I leave it like this?

    Thank you
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if you deleted data from ispconfig database manually or overwrote parts of the database. The ownership of the clien2 folder is wrong, it must be owned by root, you must have changed that manually on the shell.

    Never do a chown -r on web folders, you will mess up the ownerships of the while directory structure.

    If it works at the moment, then leave it like this, But you won't be able to use jailed cronjobs and jailed users due to the manual ownership changes you made.
     
  3. kameleon1er

    kameleon1er Member

    Thanks, but I you sure ? First, in shell, how do you make difference between Clients and Resselers ?
    2 ) I created a new Client #3, first I don't see him in /var/www/clients/clients
    but, if I move a site from Panel to this client, it merge in shell but now again, group change to web:root
    • drwxr-xr-x 2 root root 4.0K Sep 13 22:00 client1
    • drwxr-xr-x 5 web1 root 4.0K Sep 14 18:34 client2
    • drwxr-xr-x 4 web2 root 4.0K Sep 14 18:34 client3
    cd client 3 ; ls -lah :
    • drwxr-xr-x 4 web2 root 4.0K Sep 14 18:34 .
    • drwxr-xr-x 5 root root 4.0K Sep 14 18:34 ..
    • lrwxrwxrwx 1 root root 30 Sep 14 18:34 democrasite.com -> /var/www/clients/client3/web2/
    • drwxr-xr-x 10 root root 4.0K Sep 13 22:03 web2
    • drwxr-xr-x 2 web2 root 4.0K Sep 14 18:34 web2_bak_2020_09_14_18_34_02
     
  4. nhybgtvfr

    nhybgtvfr Active Member

    the /var/www/clients/client3 folder isn't created at the time you create the client.
    the client# folder is only created at the time a website is created in, or moved to that that clients ispconfig account.
     
    kameleon1er likes this.
  5. kameleon1er

    kameleon1er Member

    And do you see if Group:User is correct ? >> web2:root
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    I answered that questions already in #2:

    So the correct ownership is:

    root:root

    From an ISPConfig server:

    Code:
    [email protected]:/var/www/clients# ls -la
    total 20
    drwxr-xr-x 5 root root 4096 Aug 11 05:31 .
    drwxr-xr-x 8 root root 4096 Aug 25 02:51 ..
    drwxr-xr-x 8 root root 4096 Aug 12 03:30 client0
    drwxr-xr-x 4 root root 4096 Aug 25 02:51 client1
    drwxr-xr-x 6 root root 4096 Aug 25 02:51 client2
     
  7. kameleon1er

    kameleon1er Member

    Hi, yes I know, but one more time, I didn't touch to group:user manualy, the system do it itself :
    Code:
    [email protected]:/var/www/clients# ls -lah
    total 20K
    drwxr-xr-x 5 root root 4.0K Sep 14 18:34 .
    drwxr-xr-x 8 root root 4.0K Sep 14 18:42 ..
    drwxr-xr-x 2 root root 4.0K Sep 13 22:00 client1
    drwxr-xr-x 3 web1 root 4.0K Sep 14 18:42 client2
    drwxr-xr-x 8 web2 root 4.0K Sep 14 19:48 client3
    and this :
    Code:
    [email protected]:/var/www/clients/client3# ls -lah
    total 32K
    drwxr-xr-x  8 web2 root    4.0K Sep 14 19:48 .
    drwxr-xr-x  5 root root    4.0K Sep 14 18:34 ..
    lrwxrwxrwx  1 root root      30 Sep 14 18:34 democrasite.com -> /var/www/clients/client3/web2/
    lrwxrwxrwx  1 root root      30 Sep 14 18:41 kameleon.fr -> /var/www/clients/client3/web1/
    lrwxrwxrwx  1 root root      30 Sep 14 18:42 lucifart.com -> /var/www/clients/client3/web3/
    drwxr-xr-x 10 root root    4.0K Sep 12 01:31 web1
    drwxr-xr-x  2 web1 client3 4.0K Sep 14 18:41 web1_bak_2020_09_14_18_41_01
    drwxr-xr-x 10 root root    4.0K Sep 13 22:03 web2
    drwxr-xr-x  2 web2 root    4.0K Sep 14 18:34 web2_bak_2020_09_14_18_34_02
    drwxr-xr-x 10 root root    4.0K Sep 13 22:30 web3
    drwxr-xr-x  2 web3 client3 4.0K Sep 14 18:42 web3_bak_2020_09_14_18_42_01
    how can I fix this ?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Change the user back to root.

    And I'm pretty sure that the ownership of the folders is not set by ISPConfig like that, so there must have been manual changes been made or you use another software to edit these folders which did that.
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Btw, I just tested this in ISPConfig 3.1.15p3 and also 3.2beta1, none of these versions create a client folder with web user as owner and also older versions did not do that as I checked on my live systems.
     
  10. kameleon1er

    kameleon1er Member

    Thanks @till so I have a serious problem in my configuration. Do you think may I try to reconfigure ispConf ?
    You told me to NEVER change user:group in directories managed by IspConfig --°
     
  11. kameleon1er

    kameleon1er Member

    As I said, it's auto-generated from my ispConfig, so I think I have probably a big problem. Do you think that I can try an ispConfig reconfiguration ?
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Correct, and the reason for your issues is that you did not follow that advice and I told you above what to do do to correct your former mistake.

    It would require that you changed ISPConfig code to get a web user as owner of a client folder. My guess is that it's not your first ISPConfig install on this server, you removed ispconfig but missed to format and reinstall the whole system, and then reinstalled ispconfig on an already configured server which contained old config parts and especially folders where you had changed the owner before manually.
     
  13. kameleon1er

    kameleon1er Member

    Hi Till,
    So I reinstalled everything for Buster with this howTo on a fresh vps instance :)
    During the installation, I had 2 times shell outputs with errors, but I don't know if they are just warnings or real errors :
    ///////// shell outpout ///////////
    Code:
    Mailman error
    
    Hit enter to notify mailman owner...
    
    Traceback (most recent call last):
      File "/usr/sbin/newlist", line 274, in <module>
        main()
      File "/usr/sbin/newlist", line 256, in main
        }, mlist=mlist)
      File "/var/lib/mailman/Mailman/Utils.py", line 656, in maketext
        return findtext(templatefile, dict, raw, lang, mlist)[0]
      File "/var/lib/mailman/Mailman/Utils.py", line 633, in findtext
        raise IOError(errno.ENOENT, 'No template file found', templatefile)
    IOError: [Errno 2] No template file found: 'newlist.txt'
    
    ———————
    
    PureFtpd errors :
    
    [email protected]:/usr/local/bin# chmod 600 /etc/ssl/private/pure-ftpd.pem
    [email protected]:/usr/local/bin# systemctl restart pure-ftpd-mysql
    [email protected]:/usr/local/bin# nano /etc/fstab
    [email protected]:/usr/local/bin# mount -o remount /
    [email protected]:/usr/local/bin# quotacheck -avugm
    quotacheck: Scanning /dev/vda1 [/] done
    quotacheck: Cannot stat old user quota file //quota.user: No such file or directory. Usage will not be subtracted.
    quotacheck: Cannot stat old group quota file //quota.group: No such file or directory. Usage will not be subtracted.
    quotacheck: Cannot stat old user quota file //quota.user: No such file or directory. Usage will not be subtracted.
    quotacheck: Cannot stat old group quota file //quota.group: No such file or directory. Usage will not be subtracted.
    quotacheck: Checked 5964 directories and 62482 files
    quotacheck: Old file not found.
    quotacheck: Old file not found.
    [email protected]:/usr/local/bin# quotaon -avug
    /dev/vda1 [/]: group quotas turned on
    /dev/vda1 [/]: user quotas turned on
    
     
  14. nhybgtvfr

    nhybgtvfr Active Member

    don't know about the mailman error. mailman's purely optional and i've never needed or installed it. looking at it, it looks like a real issue, although it's possible it's a normal error from before running 'newlist mailman'

    for the quota. that's all fine. no problem there. it doesn't find the file's because they don't exist until after quota's have been turned on.
     
    kameleon1er likes this.
  15. kameleon1er

    kameleon1er Member

    Hi @till
    As you can see, I just deleted my vps, re-installed Dibian 10 and restarted the whole installation from scratch.

    I created a new site in ispConfig :
    Code:
    [email protected]:/var/www/clients/client0# ls -lah
    total 12K
    drwxr-xr-x 3 root root 4.0K Sep 16 14:13 .
    drwxr-xr-x 3 root root 4.0K Sep 16 14:13 .
    lrwxrwxrwx 1 root root 30 Sep 16 14:13 kameleon.fr -> /var/www/clients/client0/web1/
    drwxr-xr-x 10 root root 4.0K Sep 16 14:13 web1
    [email protected]:/var/www/clients/client0# 
    It's root:root ok

    but when I go to /var/www/clients/clients0/web1/
    Code:
    [email protected]:/var/www/clients/client0/web1# ls -lah
    total 40K
    drwxr-xr-x 10 root root 4.0K Sep 16 14:13 .
    drwxr-xr-x 3 root root 4.0K Sep 16 14:13 .
    drwxr-xr-x 2 web1 client0 4.0K Sep 16 14:13 cgi-bin
    drwxr-xr-x 2 root root 4.0K Sep 16 14:31 log
    drwx--x--- 2 web1 client0 4.0K Sep 16 14:13 private
    drwx-------- 2 web1 client0 4.0K Sep 16 14:13 .ssh
    drwxr-xr-x 2 root root 4.0K Sep 16 14:13 ssl
    drwxrwx--- 2 web1 client0 4.0K Sep 16 14:13 tmp
    drwx--x--x 4 web1 client0 4.0K Sep 16 14:13 web
    drwx--x--- 2 web1 client0 4.0K Sep 16 14:13 webdav
    and in /web :
    Code:
    [email protected]:/var/www/clients/clients0/web1/web# ls -lah
    total 32K
    drwx--x--x 4 web1 client0 4.0K Sep 16 14:13 .
    drwxr-xr-x 10 root root 4.0K Sep 16 14:13 .
    drwxr-xr-x 2 web1 client0 4.0K Sep 16 14:13 error
    -rwxr-xr-- 1 web1 client0 7.2K Sep 16 14:13 favicon.ico
    -rwxr-xr-- 1 web1 client0 1.9K Sep 16 14:13 index.html
    -rwxr-xr-- 1 web1 client0 14 Sep 16 14:13 robots.txt
    drwxr-xr-x 2 web1 client0 4.0K Sep 16 14:13 stats
    and I didn't change anything with the shell... so ?
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    The permissions are all correct now. The website folder must be owned by the web user, but the client folder is never owned by the web user, it is owned by root. But that's all ok now, as you can see from your ls results.
     

Share This Page