0

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 //192.168.1.123/folder /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?

closed as off-topic by Jeff Schaller, Christopher, Timothy Martin, Rui F Ribeiro, Archemar Apr 18 '18 at 5:07

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Jeff Schaller, Christopher, Timothy Martin, Rui F Ribeiro, Archemar
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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". – Ulrich Schwarz 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
1

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 //192.168.1.124/folder /mnt/win

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