I have a folder hosted on a (brace yourself) Windows Server (2008) and I need CentOS to be able to read files from it. I am currently using this command:

$ sudo mount -t cifs -o credentials=/home/dev-admin/credentials.txt,uid=1000 // /mnt/win
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

I've done some googling, and found a few posts with possible solutions, I've tried adding the sec option to the mount command, testing every available option but all return either messages along the lines of Invalid option or Permission Denied.

/var/log/messages doesn't show anything the above error message doesn't. The only thing worth noting is NT_STATUS_LOGIN_FAILURE but I've triple and quadruple-checked the credentials and it works (copied and pasted into remote desktop on another Windows machine and it works)

So I guess my question, is, what's wrong with my command and how do I debug this?

  • You can post your solution as an answer, and after a grace period of some hours, you can accept it as valid. Otherwise, this question is likely to be closed and eventually deleted as "went away on its own or when a typo was fixed". Mar 13 '18 at 16:40
  • @UlrichSchwarz I'll post as answer, as could be a gentle reminder to people to double check details, thanks for advice :)
    – treyBake
    Mar 13 '18 at 16:46

I fixed it. Always double check ip addr, and I also had to add vers=2.1 to my -o param otherwise I'd get Remote I/O error so full string is now:

sudo mount -t cifs -o credentials=/home/dev-admin/credentials.txt,uid=1000,vers=2.1 // /mnt/win

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