Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.