New web user UIDs out of sync on servers

Discussion in 'General' started by Dogbreath, Dec 5, 2019.

  1. Dogbreath

    Dogbreath New Member

    Pair of Ubuntu 18.04 servers configured per https://www.howtoforge.com/tutorial...ase-cluster-on-debian-8.4-with-ispconfig-3/5/
    ISPconfig 3.1.13

    Both servers have in "System > Server Configuration > [servername] > Web > Permissions > Start ID for userid/webid connect" 10000 and "Connect Linux userid to webid" enabled.

    servera is the master and serverb is the slave. I create a new site on servera and I can see the file permissions are wrong in the web directory:

    Code:
    root@servera# ls -al /var/www/clients/client1/web39/web
    total 32
    drwx--x--x  4 5013 client1 4096 Dec  5 10:16 .
    drwxr-xr-x 10 root root    4096 Dec  5 10:16 ..
    drwxr-xr-x  2 5013 client1 4096 Dec  5 10:16 error
    -rwxr-xr--  1 5013 client1 7358 Dec  5 10:16 favicon.ico
    -rwxr-xr--  1 5013 client1 1861 Dec  5 10:16 index.html
    -rwxr-xr--  1 5013 client1   14 Dec  5 10:16 robots.txt
    drwxr-xr-x  2 5013 client1 4096 Dec  5 10:17 stats
    root@servera# grep web39 /etc/passwd
    web39:x:10039:5005::/var/www/clients/client1/web39:/bin/false
    
    All files should be owned by web39/10039 not 5013.
    Checking serverb.

    Code:
    root@serverb# ls -al /var/www/clients/client1/web39/web
    total 32
    drwx--x--x  4 web39 client1 4096 Dec  5 10:16 .
    drwxr-xr-x 10 root  root    4096 Dec  5 10:16 ..
    drwxr-xr-x  2 web39 client1 4096 Dec  5 10:16 error
    -rwxr-xr--  1 web39 client1 7358 Dec  5 10:16 favicon.ico
    -rwxr-xr--  1 web39 client1 1861 Dec  5 10:16 index.html
    -rwxr-xr--  1 web39 client1   14 Dec  5 10:16 robots.txt
    drwxr-xr-x  2 web39 client1 4096 Dec  5 10:17 stats
    root@serverb# grep web39 /etc/passwd
    web39:x:5013:5005::/var/www/clients/client1/web39:/bin/false
    
    So serverb is creating user web39 with UID 5013, but why?
    Can't see anything about the UID in here:
    Code:
    removed because it's too long
    
    I think what happened was the site got created on servera first, then serverb, then the unison job synced the files with the wrong ownership back to servera as the files were newer on B than A.

    What can I do to resolve this?
     
  2. Dogbreath

    Dogbreath New Member

  3. Dogbreath

    Dogbreath New Member

    I have manually corrected the UID of the new user on serverb to 10039 to match servera.
    I have then created a new site on servera, and now the UIDs are off by one! UID for web41 on servera is 10041, UID for web41 on serverb is 10040. UID 10041 doesn't exist on serverb.
     
    Last edited: Dec 6, 2019
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Check the settings for the uid options on the slave server directly in the database, the table is anmed server and the data is stored in ini format in a field named config. Compare it with the settings that you set on the master. Maybe the settings did not got saved on the slave correctly somehow and therefore the slave does not applies them.
     
  5. Dogbreath

    Dogbreath New Member

    So yeah, this is probably the issue.
    The entry for servera reads:
    Code:
    connect_userid_to_webid=y
    connect_userid_to_webid_start=10000
    
    and for serverb:
    Code:
    connect_userid_to_webid=n
    connect_userid_to_webid_start=10000
    

    Well.....looking again in the web interface I see that serverb *doesn't* have "Connect Linux userid to webid" ticked! Oversight on my part. Thanks for the help anyway.
     

Share This Page