Rob*_*Rob 2 security permissions fstab
我想将网络共享挂载放在 /etc/fstab 中,但默认情况下该文件是全局可读的,它允许每个人读取我放入挂载选项中的凭据。
使/etc/fstab 不能被除root 以外的任何人读取是否安全,例如root:root 拥有的权限为0640?
FWIW,我正在使用 Debian Squeeze/Wheezy 和 Ubuntu LTS。
你想挂载什么份额?有些允许将凭据放入只能由 root 读取的外部文件中。这是处理此问题的首选方法。
一个例子:CIFS/SMB 知道选项credentials=filenamewhere filenameis a file with 以下内容:
username=value
password=value
domain=value
Run Code Online (Sandbox Code Playgroud)
有关man mount.cifs更多信息,请参阅。