I recently moved my website to a CentOS 6 VPS (from a HyperVM-enabled CentOS 5 VPS). I set up vsftpd to handle our FTP needs. I created a local user for everyone who needs to use the FTP. For my user Joe, he logs in with FileZilla and lands in
/home/joe. Joe can use that folder for private storage, but I have put a symlink so he can access public storage at
So in his directory, I did as root:
ln -s /var/www/html/storage/ storage
For some reason the ending
/ is necessary, or else
storage will appear as a file in FileZilla instead of a shortcut to a directory.
Anyway, while in
/home/joe, when Joe navigates to
storage his path suddenly becomes
/var/www/html/storage instead of
/home/joe/storage. This makes it hard to navigate back up to the parent folder into his home directory.
Is there a way to correct this?
chroot is disabled on my server, and that's fine. I trust my users, but it's just inconvenient for them to be thrown around the filesystem like that via the symlinks. If I do enable
chroot then they won't be able to get to
/var/www at all.
The bizarre thing is that this worked on my previous VPS with HyperVM. But that one used PureFTP instead of vsftp. And I think it created virtual users instead of real local users on the machine. Are virtual users necessary to be able to do symlinks the way I want?
Another solution I researched was using
mount --bind, but I am unsure if this is the best action to take. Will it wreck my filesystem to have tons of mount points? It also just feels improper when
ln -s ought to be working. If I SSH into my server as Joe, I am able to go to
/home/joe/storage in a bash shell. So why can't I do it in FTP?
As a side note, does this have something to do with
MLSD in FTP clients? I have a Mac user who is not able to see the symlinks as symlinks at all, even if I put a trailing
/ in the link.