我试图通过fstab和netfs在CentOS 5.x盒子上永久挂载一个windows服务器共享。
我可以通过以下命令成功安装和访问共享:
mount.cifs //winserver.addomain.int/shared /mnt/foo --verbose -o rw,-dom=addomain,credentials=/opt/foo2/etc/cred.file,dir_mode=0775,file_mode=0664,soft
这工作正常。
所以然后我卸载它,并添加以下行到/ etc / fstab:
//winserver.addomain.int/shared /mnt/foo cifs rw,-dom=addomain,credentials==/opt/foo2/etc/cred.file,dir_mode=0775,file_mode=0664,soft 0 0
而当我运行服务netfs开始我得到以下错误:
Mounting CIFS filesystems: error -1 opening credential file
为了安全起见,我已经将凭据文件的所有者和组设置为root:root和文件权限为0400
我以root用户身份运行所有命令(包括mount test和netfs start命令),所以我不明白为什么会有权限问题。
我也testing了另一个盒子上的这个过程(有不同的份额),它工作正常。
有人可以告诉我,如果有任何netfsdebugging日志,我可以在这里检查? 我还能做些什么来排除故障?
(*叹气)用户错误=(
有问题的系统实际上在fstab选项中拥有凭证== 。 额外的=令人困惑的mount.cifs(正确如此)。