mount error(13): Permission denied with windows share

131,748

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)

Solution 3

sorry for not asking in a comment, but my rep is not high enough.

Do you have a PDC running on the Windows 2008 server? If so you probably missing just the domain for the user

 mount.cifs -o user=USER,dom=DOMAIN,password=MYPASS //pdc.domain/test /mnt

Have you tried to mount as administrator? If this works, then it's probably only a problem with the share permissions.

Otherwise check the syslog file, it should give you more informations about the error. Possible that the server requires packet signing and your request is without.

Solution 4

I am not sure but instead of CIFS use SMBFS and try to mount your shared partition.

  mount -t smbfs //hostname/share /mnt/temp -o username=someuser,password=somepassword

Solution 5

Try this command instead:

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

Share:
131,748
Micha Roon
Author by

Micha Roon

Updated on September 18, 2022

Comments

  • Micha Roon
    Micha Roon over 1 year

    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

  • Micha Roon
    Micha Roon about 11 years
    I get mount: unknown filesystem type 'smbfs'
  • Micha Roon
    Micha Roon about 11 years
    I know the credentials are correct and the servers can communicate, as the smbclient can connect
  • Micha Roon
    Micha Roon about 11 years
    I know the credentials are correct and the servers can communicate, as the smbclient can connect
  • user9517
    user9517 about 11 years
    @DrGorb: That's not actually what I said to chcek though.
  • Nathan C
    Nathan C about 11 years
    smbfs isn't supported in most new OSs anymore anyway.
  • Micha Roon
    Micha Roon about 11 years
    what I meant is that the credentials are correct and written correctly and that they are accepted by the Windows server and that the Linux server can send them. If I enter wrong credentials I get the same error though
  • user9517
    user9517 about 11 years
    @DrGorb: So it won't hurt to put quotes around them just to check will it ?
  • Micha Roon
    Micha Roon about 11 years
    same result as previous
  • Micha Roon
    Micha Roon about 11 years
    tried with single and double quotes: same result
  • Daniel Dinnyes
    Daniel Dinnyes over 9 years
    Accept this answer as the solution please. I had the same problem on Debian and none of the other parameter naming and domain\username tricks in the other answers solved it. Thanks for it!