mount error(13): Permission denied – Ubuntu 12.04

mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

This one can be really hard to track down.  There are many reasons you might get this error.  Basically it means you were denied access to the share you are trying to connect to with mount.cifs or mount -t cifs

I was also getting these errors in my syslog:

Aug 19 12:47:00 vger kernel: [261820.963173] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
Aug 19 12:47:00 vger kernel: [261820.963185] CIFS VFS: Send error in SessSetup = -13
Aug 19 12:47:00 vger kernel: [261820.964461] CIFS VFS: cifs_mount failed w/return code = -13

I have seen a number of people who said that the problem was solved by including the domain in the options parameters, or putting no spaces after the ‘=’ sign.

However, for me the trick was the security setting. I recently disabled ntlm v1 on all our windows servers. Unfortunately, the samba mounter wants to use that by default. Specifying ntlmv2 did the trick for me. You may be using a newer release of linux that uses ntlmv2 by default, and you may need to specify ntlm, so it could be that too.

Adding sec=ntlmv2 to the options worked for me:

mount -t cifs // /mnt/myshare -osec=ntlmv2,domain=MYDOMAIN,username=myusername,password=mypassword

Hope this helps someone.

This entry was posted in Linux, Samba. Bookmark the permalink.

Comments are closed.