Home / Architecture & Best Practices / How To's / Linux / Platforms / Unix/BSD / Making Links Work in VSFTPD on Linux
I wanted to setup access to my chrooted FTP users to specific directories under my web server. There didn’t seem to be a streamlined way to use symbolic or “sym” links. I discovered that utilizing the “mount –bind” command seems to do the trick. (Don’t use “rm” to remove these mounted directories or you’ll erase the actual target directory. For removing these mounted links, use “umount”.)
Here is a way to utilize this temporarily (this will go away on reboot, scroll down for how to make this permanent):
“mkdir /home/myuser/www.website.com”
“mount –bind /var/www/www.website.com /home/myuser/www.website.com”
To remove this mount, type the following:
“umount /home/myuser/www.website.com”
To make your mount permanent–so it doesn’t go away on server reboot–add this to your fstab file (often found at /etc/fstab):
"/var/www/dev /home/ftp_user/www_dev none bind 0 0"
References
http://www.ducea.com/2006/07/27/allowing-ftp-access-to-files-outside-the-home-directory-chroot/
https://help.ubuntu.com/community/Mount