I'm creating a new ftp user on Plesk (CentOS) trough shell using:
useradd -d /var/www/vhosts/domain.com user1
This works. No problems here.
I then then add another user but this time restricted to /httpdocs/foo not just (domain.com)
useradd -d /var/www/vhosts/domain.com/httpdocs/foo user2
Now I get an incorrect login error:
Response: 220 ProFTPD 1.3.3c Server (ProFTPD) [x.x.x.x]
Command: USER user2
Response: 331 Password required for user2
Command: PASS *********
Response: 530 Login incorrect.
My bin/passwd
file has the user2 there and I tried to change it there and I get the exat same thing
user2:x:10038:505::/var/www/vhosts/domain.com:/bin/false
//Logs In
user2:x:10038:505::/var/www/vhosts/domain.com/httpdocs/foo:/bin/false
//Fails
I restart the service using: /etc/init.d/xinetd restart
Any ideas? Thanks
Solution:
/usr/sbin/useradd -g psacln -d /var/www/vhosts/domain.com/httpdocs/foo user2
chown -R user2:psacln /var/www/vhosts/domain.com/httpdocs/foo
chmod 775 /var/www/vhosts/domain.com/httpdocs/foo
passwd user2