flip79
April 13th, 2008, 06:08 AM
Hello, I recently bought a VPS with CentOS (sorry to ask here, but I'm usually an Ubuntu user, and Ubuntu Forums are my second home :P )
I have a little problem: I'm currently running some sites that I directly manage, but I have also a site that should be updated by an external person via FTP.
I installed VSFTP, configured it to allow FTP local user login, then I added an user (let's say his user name is "foo"), and I disabled SSH access for him in /etc/passwd:
foo:x:500:500::/home/foo:/sbin/nologin
then I set VSFTP to CHROOT users:
chroot_local_user=YES
now user foo can login with any FTP client, and he is automatically CHROOTed to his home directory, but he can only operate in this directory.
So, I also mounted the directory with the site I want him to manage to his home dir:
mount --bind /var/www/sites/foo-site.com/htdocs /home/foo/htdocs/
so he can browse to this dir too, but he has no write permissions.
How I can add this permission for my "foo" user?
actually, permissions for the foo-site.com directory are:
drwxrwxr-x 3 ricky apache 4096 Apr 2 10:53 htdocs
(ricky is me :) )
I have a little problem: I'm currently running some sites that I directly manage, but I have also a site that should be updated by an external person via FTP.
I installed VSFTP, configured it to allow FTP local user login, then I added an user (let's say his user name is "foo"), and I disabled SSH access for him in /etc/passwd:
foo:x:500:500::/home/foo:/sbin/nologin
then I set VSFTP to CHROOT users:
chroot_local_user=YES
now user foo can login with any FTP client, and he is automatically CHROOTed to his home directory, but he can only operate in this directory.
So, I also mounted the directory with the site I want him to manage to his home dir:
mount --bind /var/www/sites/foo-site.com/htdocs /home/foo/htdocs/
so he can browse to this dir too, but he has no write permissions.
How I can add this permission for my "foo" user?
actually, permissions for the foo-site.com directory are:
drwxrwxr-x 3 ricky apache 4096 Apr 2 10:53 htdocs
(ricky is me :) )