- Plesk for Linux
Additional FTP accounts added in Plesk > Domains > example.com > FTP Access becomes the owner of the site's vhost:
# ls -ld /var/www/vhosts/plesktest.com/
drwx-x--. 5 ftpaccount psaserv 52 Oct 9 18:51 /var/www/vhosts/plesktest.com/
- The PHP running under an additional FTP user instead of the subscription's system user.
Such behaivior related to the fact that recently, a system user of a subscription was renamed in Domains > example.com > Web Hosting Access. It is expected behavior.
System user of a subscription and additional FTP user are created with the same UID. It can be seen with the following command while connected to the server via SSH:
# grep 'FTPuser\|SYSuser' /etc/passwd
A username is requested by its UID. In case there are several usernames with the same UID, displayed username is the one which is placed higher in the file
/etc/passwd. It can be checked with the command below:
# getent passwd 10013
Please note that in centos8 this behavior was changed and OS shows the last added user:
Such behavior registered as the bug https://support.plesk.com/hc/en-us/articles/360016932800
To display the system user of the subscription as the owner of the subscription's files, rename the additional FTP user in Domains > example.com > FTP Access.
This will rewrite the file
/etc/passwd and put the additional FTP user at the bottom of the file. After that, the name of the FTP user can be changed back.
In my case, I had to do the opposite: rename the system user in Domains > example.com > Web Hosting Access.
When you use several usernames with the same UID the behaviour in any Linux might become unspecified. We had issues in the past with sudo and cron. Probably programmers do assume a 1:1 relationship between user and UID.
Please sign in to leave a comment.