chroot filesystems

It's possible to provide files from elsewhere in a file system, without using symbolic links as chroot doesn't allow it and some programs don't recognise them for security, or hard links that cannot be done across filesystems.

We can use bind mounts. The fstab is like for other file systems, except you list a source folder instead of a block device. Then, for example, mount /home/ftp/downloads and your files will be accessible also in the new location. Remember to list it in fstab after mounts that provide the origin folder, so that automounting works correctly on system startup.

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>               <dump>  <pass>
/mnt/downloads     /home/ftp/downloads none    rw,bind                 0       0