挂载 – 绑定与符号链接

Linux服务器
/www/website目录是我的html目录
希望用户把ftp到/user/website/public_html目录下,这个目录是chroot的,只限于ftp访问

我目前通过完成这个
sudo mount --bind /www/website /user/website/public_html -t ext4
但是,这几天后打破和停止工作(不知道为什么)。

所以我应该使用挂载 – 绑定或者我应该使用符号链接? 如果挂载 – 绑定,我怎么能防止它打破?

你的系统是否定期重启? 如果你正在绑定挂载,你应该在/etc/fstab设置它们。 如果只是临时性的,你应该手动安装它们。 没有魔法可以在重新启动后自动恢复安装。 你需要configuration你的系统来安装东西。

绑定坐骑看起来像下面在你的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