Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a home server running Ubuntu, and several computers connecting to it running Ubuntu and Windows 7. My main Ubuntu machine is having issues where any file or directory I move to the server will have read-only access, meaning I can not move the contents of the folder. I've now found that if I mount manually via "connect to server", everything is fine, but if I connect with fstab, I have the permissions issue.

What would cause the createmask or permissions settings to differ when mounted manually vs. through fstab?

Here is an example from my fstab:

//192.168.42.2/Fileserver   /media/theta    cifs    guest,uid=1000,iocharset=utf8   0   0
share|improve this question

1 Answer 1

A fairly insecure and permissive solution is to add ,dir_mode=0777,file_mode=0666 immediately after guest,uid=1000,iocharset=utf8, leaving no space after the utf8 bit.

I would encourage you to experiment with more restrictive settings like ,dir_mode=0755,file_mode=0644 and see if that will work for you.

The mount options are described in man mount. Except for cifs - the man page says:

Mount options for cifs
See the options section of the mount.cifs(8) man page (cifs-utils package must be installed).

man 8 mount.cifs tells you everything you need to know and some more. It says (among other things):

FILE AND DIRECTORY OWNERSHIP AND PERMISSIONS
The core CIFS protocol does not provide unix ownership information or mode for files and directories. 
Because of this, files and directories will generally appear to be owned by whatever values the uid= or 
gid= options are set, and will have permissions set to the default file_mode and dir_mode for the mount.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.