Following this guide I was able to get my Samba share to mount on my Ubuntu 12.04 system. I can navigate the folders just fine. However I cannot create a directory nor create a file. I get the following error:

mkdir: cannot create directory `ServerBackups': Permission denied

Looking at the directory permissions, I see

drwxr-xr-x  1 root root    0 Aug 14 22:34 stora

I have tried to change that to root:sambashare with no errors with sudo chown :sambashare stora/, however when I confirm it completed, it is back to root:root. This is what I added to my /etc/fstab:

\\\mylibrary   /media/stora    cifs    credentials=/etc/samba/user,noexec  0       0

Mounting the drive works fine. I want a regular user (primarily me) to be able to write to this mount.

What could I be missing?

1 Answer 1


Assuming the user in the credentials file has read/write access, try this as a test:

mount.cifs //server/share/name /mnt/somewhere -o user=username,file_mode=0664,dir_mode=0775

If that works, add the file_mode and dir_mode options to your fstab. There might be other options which interest you in the manpage: man 8 mount.cifs.

Edit: oh, and don't mess around with non-native filesystem perms or ownership - your mounter should always be responsible for setting the owner:group and permissions.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .