Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm configuring svftp on a linux machine.

At the moment local users can login via ftp and they will see listened their home dir. They have write acces to it.

No I want the users to write in de /var/www/ dir. Therefore I created an new group apache. Added users to the group and gave the group write access to /var/www. Via the terminal all users can write .var/www/. I created a link in the home directory to /var/www via

ln -s /var/www/ /home/user/www

ls gives:

drwxr-xr-x 2 orangetux orangetux 4096 Jun 23 15:06 ftp
lrwxrwxrwx 1 orangetux orangetux 21 Jun 23 15:00 www -> /var/www/

But when I use FTP I see the link but I cannot follow it. Error 550 which means file not found or bad access.

How can I solve this, so that the users have access to /var/www via their home dir?

share|improve this question
up vote 0 down vote accepted

Found it here

Q) Can I restrict users to their home directories? A) Yes. You are probably after the setting: chroot_local_user=YES

But a more secure solution is written down below.

Q) Why don't symlinks work with chroot_local_user=YES? A) This is a consequence of how chroot() security works. As alternatives, look into hard links, or if you have a modern Linux, see the powerful "mount --bind".

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .