mount error (13): Permission denied

Running into cryptic errors really sucks, and this was certainly no exception. We had a Windows share provided to us that we wanted to mount to an Ubuntu 10.04 LTS server for general storage.

After reading the Ubuntu MountWindowsSharesPermanently wiki page and consulting the smbmount man page I came up with this new (initial) /etc/fstab entry:

//192.168.1.5/test-smb1 /mnt/it_hosted cifs credentials=/root/it_hosted_windows_share_mount.conf,iocharset=utf8,sec=ntlm2 0 0

The /root/it_hosted_windows_share_mount.conf file contained:

username=storageuser
password=SuperSecret
domain=example

I’ve substituted values of course. One thing to note is that if example.com were the real domain, I’ve made sure to use example as the value.

Then came the mount error (13): Permission denied error. I tried from a Windows box and was able to connect fine, so I knew that the server/share wasn’t the problem.

I then decided to call mount directly as shown here. After getting that working, I rechecked the syntax used in /etc/fstab and then finally looked at /root/it_hosted_windows_share_mount.conf again.

What do you know, the old & much despised EOL issue. After changing the DOS EOL to UNIX everything worked. I can’t count the number of times I’ve been bitten by that.

Linux Pocket Guide, 2nd Edition by Daniel J. Barrett

Front cover for Linux Pocket Guide, 2nd Edition by Daniel J. Barrett

(Full disclosure: This book was provided for review at no cost to me)

What you should know

  • To borrow someone else’s phrase, this is NOT a “small form linux for dummies” title, and assumes you are a fairly knowledgeable about computers.
  • Even though the front cover mentions Fedora, the coverage is minimal; whether that is good or bad is up to you.
  • The majority of the book covers command-line applications, although there are GUI applications mixed in the later half of the book.
  • While the command-line suggestions the book gives are solid, many of the GUI applications are no longer maintained and in my opinion should not have been anything more than a footnote.
  • Errata pages for this book:

Continue reading