1

I'm using CentOS release 5.10 I have a mount point setup in /etc/fstab that was working, but now it doesn't. After a reboot the mount point doesn't exist and running sudo mount -a results in: mount error 13 = Permission denied

The entry in my fstab looks like this:

//my.server/my\040Folder/MY\040SUBFOLDER/other\040folder       /var/ftp/virtual_users/myfolder cifs username=mydomain\134myuser,password=mypassword  1 1

I've tried mounting manually in the command line using this:

$ sudo mount -t cifs "//my.server/my Folder/MY SUBFOLDER/other folder"   /var/ftp/virtual_users/myfolder --verbose  -o username=myuser,password=mypassword,domain=mydomain

My result is: mount.cifs kernel mount options: unc=//my.server\my Folder,ip=192.168.150.100,ver=1,rw,username=myuser,domain=mydomain,prefixpath=MY SUBFOLDER/other folder,pass=********

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

I can successfully log in with smbclient:

$ smbclient "//my.server/my Folder" -U myuser -W mydomain

and from there I can cd into the MY "SUBFOLDER/other folder" directory.

After much google searching, many fixes involved setting the Security mode. I tried ntlm,ntlmi,ntlmv2,ntlmv2i but none of the options changed the output.

There is a mount entry for another folder on this same server, which is working, but it doesn't go down to a sub folder:

//my.server/other /var/ftp/virtual_users/other cifs username=mydomain\134myuser,password=mypassword,nobrl,noperm  1 1

I also tried adding the noperm and nobrl options to my problem mount, but no changes.

The System Admin of the windows server (my.server) verified that myuser has full control of all the folders I'm trying to access.

  • 1
    Check your logs. – Michael Hampton Nov 14 '14 at 20:36
  • As far as I know, you can't mount subdirectories like that. smbclient works because you're going directly to the share. If you need access to that subfolder without having to cd to it, create a new share with that subdirectory in it. You also should really be using a credentials file. – Nathan C Nov 14 '14 at 20:41
  • @MichaelHampton I've checked /var/log/messages but it has no more info than what I've provided above. Are there any other logs I could check? Thanks – khartnett Nov 14 '14 at 20:44
  • Thanks for your suggestion @NathanC, I have a screen shot of the previous mount setup. running $mount would show: //my.server/my Folder/MY SUBFOLDER/other folder on /var/ftp/virtual_users/myfolder cifs (rw,hand). Is there another way to set this up? Sorry for my ignorance but I'm not sure what you mean to create a new share. – khartnett Nov 14 '14 at 20:48
  • Create a new share on the Windows server that directs you to the subfolder you want instead of trying to mount to it. – Nathan C Nov 14 '14 at 20:52
0

While I was not able to resolve the situation completely, I discovered I was able to mount the share by itself:

//my.server/my Folder

It was the prefix path that was causing the issue. This worked without any modifications to the parameters or user. Why this worked before with the full path and no longer works now is something I'd love some insight on.

From there I modified the process that uses that mount location, and changed the root directory from '/' to '/MY SUBFOLDER/other folder/' and everything worked from there.

0

Tested on Centos 7(6?) in /etc/fstab:

//win_server/share /mount cifs credentials=/etc/cred.cifs,nounix,nobrl,noperm 0 0

On Centos 5

//win_server/share /mount cifs credentials=/etc/cred.cifs,nounix 0 0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.