fstab cifs permissions

Asked by John Franklin

I have placed the following pseudo-line in my fstab file to mount a network share:

//Server/sharename /mnt/mountdir cifs username=name%pwd,umask=000 0 0

The share mounts fine but the files in the mounted directory only have write access for root; for ordinary users it's read-only. Furthermore, even root is not allowed subsequently to change the permissions.

I thought umask=000 gave everyone full access. How can I give all users write access to these files?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Solved by:
John Franklin
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Try:

//Server/sharename /mnt/mountdir cifs username=name%pwd,rw,user,uid=1000umask=000 0 0

Should do it

Revision history for this message
John Franklin (john-quinze) said :
#2

Thanks, but I tried that and it didn't work either. However, I have found a solution thus:

//Server/sharename /mnt/mountdir cifs username=name%pwd,dir_mode=0777,file_mode=0777,uid=name,gid=users 0 0

It seems that the dir_mode and file_mode are key. The older dmask and fmask don't work, nor does umask.