相当于让一个可写的目录软链接到另一个地方变成只读的目录,但是原目录仍然保持可写。解决方法是用mount --bind
,将目录挂载到目标点,变成只读文件系统。
mount --bind -r /path/to/source/ /path/to/dest/
umount /path/to/dest/
原文:https://askubuntu.com/questions/243380/how-to-create-a-read-only-link-to-a-directory
相当于让一个可写的目录软链接到另一个地方变成只读的目录,但是原目录仍然保持可写。解决方法是用mount --bind
,将目录挂载到目标点,变成只读文件系统。
mount --bind -r /path/to/source/ /path/to/dest/
umount /path/to/dest/
原文:https://askubuntu.com/questions/243380/how-to-create-a-read-only-link-to-a-directory
Except as otherwise noted, this blog is licensed under CC BY-SA 4.0 License.
©2021-
searchstar
|
pv
|
uv
Theme Tree
by Wu Jun
Powered by Hexo