mount error(13): Permission denied with windows share

I am struggling to mount a windows 2008 share on a CentOS 6.4 (64 bits) server

when I use smbclient it works:

smbclient  //esb.local/dfs -U ESBSertal -W ESB -P MyPassword

but with mount it does not. I tried on the command line:

mount.cifs //esb.local/dfs -o username=ESBSertal,password=MyPassword,domain=ESB /mnt/win

and adding a line to /etc/fstab

//esb.local/dfs /mnt/win cifs username=ESBSertal,password=MyPassword,domain=ESB 0 0

in both cases I get the same error:

mount.cifs //esb.local/dfs -o username=ESBSertal,password=MyPassword,domain=ESB /mnt/win
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

and for fstab

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

I am grateful for your support.

just an update: this is executed as root. neither as root nor sudo work

Micha


Solution 1:

I could overcome the error with mount -t cifs ... simply add the parameter sec=ntlmsspi to the options. Other possible options are:

ntlmssp
ntlmv2
ntlmv2i

I was able to create a mount point with autofs by following the hint number 4 from this site

Some changes needed to be made to /etc/auto.mymount The option sec must be specified. I found the correct parameters here (at the very bottom of the page)

My /etc/auto.mymount ended up containing one line which is:

share -fstype=cifs,rw,noperm,user=ESBSertal,pass=MyPassword,domain=ESB,sec=ntlmsspi ://esb.local/dfs

executing service autofs restart renews the information.

this allowed me to access the contents of the share under /mnt/win/share

Solution 2:

There doesn't look to be anything inherently wrong with what your doing.

  • Check that the username/password etc don't have punctuation/whitespace and if they do put ' ' around them.

  • Check that the CentOS and Windows firewalls are allow connections (though you'd probably get a different error message for them)