Your typical ftp setup will allow your users to only copy/modify stuff in their own home dir (=chroot jail). Which makes sense. However, from time to time, you’ll want to access directories outside your home dir and then the following workaround can come in handy. Concretely, I have a few hard disks in my box, so, from time to time, I want to write directly to another partition than my home partition because of space constraints.
Obviously, you can allow root to access ftp, but we’d like to avoid that if possible, right? Simply making a symbolic link in our home dir also doesn’t work because of the chroot jail.
What you can do however, is mount a directory in another place. Suppose I have a /dev/sdb1 which is mounted to /mnt/data. I want to have access to the download dir on that drive. Then I can do:
mount --bind /mnt/data/download /home/mattie/download
to access this from my home dir. you can use the -r option to make it read-only if you wish (though doesn’t make much sense in my scenario). I suppose it might also work using hard links but I didn’t try that as I didn’t need a permanent link. Using mount, the link simply disappears on the next reboot.