4

I have a cifs mount that is mounted from /etc/fstab. But I would quite like creation of files/dirs on that share to ignore my umask. Is that possible? It seems that cifs does not support the umask=000 option (source: man mount.cifs).

My current best option is to set my system-wide umask to 000, but I'd rather not do this as I'd like to keep the local machine a bit more locked down. The silly thing is that my previous NAS did this fine, so maybe it's a server-side change that's required?

  • 1
    How about the file_mode and dir_mode options? – Cristian Ciupitu Jul 19 '14 at 19:35
  • From what I understand, this only applies to existing files, if the server does not support the CIFS Unix extensions (which it seems mine did). – spookypeanut Jul 20 '14 at 21:47
3

As suggested in my question, it was a server-side change that needed making. I added these lines to /etc/smb.conf on the server:

create mask = 0666
force create mode = 0666
directory mask = 0777
force directory mode = 0777

And now it works fabulously.

3

The noperm fstab option allows all users to read and write to the CIFS mount (which is what umask=000 would have done if it was supported by mount.cifs).

Example line in /etc/fstab:

\\computer\UNC\path  /mnt/path  cifs  auto,rw,user,noperm,credentials=/path/to/credentials.txt  0 0

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.