Mount --bind versus symlinks

Linux server
/www/website directory is my html directory
Want users to ftp to /user/website/public_html directory which is chrooted and limited to ftp only access

I currently accomplish this via
sudo mount --bind /www/website /user/website/public_html -t ext4.
However, this breaks and stops working after a few days (not sure why).

So should I be using mount --bind OR should I be using symlinks? If mount --bind, how can I prevent it from breaking?


Does your system periodically reboot? If you are doing bind mounts you really should be setting them up in your /etc/fstab. You should only be manually mounting them if they are meant to be temporary. There is no magic that automatically restores mounts after a reboot. You need to configure your system to mount things.

Bind mounts look like below in your fstab.

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/mapper/vg1-root /               ext4    errors=remount-ro 0       1
# also mount root to /srv/vg1-root/
/               /srv/vg1-root/  none    bind