概述
运维中常遇到类似需求,在windows(192.168.2.212)上创建了一个共享盘,设置了共享权限对本地账户test可读可写,然后在Linux端创建挂载点/share,然后执行mount -t cifs //192.168.2.212/test /share -o username=test,password=Pass1234,但提示以下信息:
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
检查拼写都没问题,查询发现是安全策略的问题,根据man mount.cifs中关于安全模式的描述,内核3.8默认使用的是ntlmssp,其余使用的是ntlm,我这里查询内核是3.10.0-327.el7.x86_64(执行uname -a可以查看),选用了ntlm,最终语句是mount -t cifs //10.15.2.212/test /share -o username=test,password=Pass1234,sec=ntlm,执行成功。
sec=
Security mode. Allowed values are:
· none - attempt to connection as a null user (no name)
· krb5 - Use Kerberos version 5 authentication
· krb5i - Use Kerberos authentication and forcibly enable packet signing
· ntlm - Use NTLM password hashing
· ntlmi - Use NTLM password hashing and force packet signing
· ntlmv2 - Use NTLMv2 password hashing
· ntlmv2i - Use NTLMv2 password hashing and force packet signing
· ntlmssp - Use NTLMv2 password hashing encapsulated in Raw NTLMSSP message
· ntlmsspi - Use NTLMv2 password hashing encapsulated in Raw NTLMSSP message, and force packet signing
The default in mainline kernel versions prior to v3.8 was sec=ntlm. In v3.8, the default was changed to sec=ntlmssp.
If the server requires signing during protocol negotiation, then it may be enabled automatically. Packet signing may also be enabled
automatically if it's enabled in /proc/fs/cifs/SecurityFlags.
最后
以上就是大意台灯为你收集整理的cifs mount error(13): Permission denied的全部内容,希望文章能够帮你解决cifs mount error(13): Permission denied所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复