I'm having some problems mounting samba shares through fstab. The problem I'm having is that I cannot write to the share unless I am root. I've tried changing the permissions to 777 and changed ownership to myself. However, every time it's re-mounted, the permissions get reset to 755 and root ownership.

There is no writing problems when writing from another Windows-based PC, so I'm led to believe this is something I'm doing wrong. For record, here is my fstab entry:

//       /media/downloads        cifs    username=Administrator,password=PASS,iocharset=utf8,sec=ntlm   0       0
//       /media/media    cifs    username=Administrator,password=PASS,iocharset=utf8,sec=ntlm   0       0

The two drives in question are NTFS. I have tried adding dir_mode=0777 and umask=000 beside the iocharset, still with no avail.

Is there something I am missing here?



It seems I've figured it out. It seems that I wasn't unmounting the previous mounts before running

mount -a

I've added noperm, file_mode=0777, dir_mode=0777 and UID=your username to the mount. The UID will change ownership of the folder, and file / dir mode changes the permissions.

| improve this answer | |

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.