[Samba] mode=777 does not work as fstab option
urban at teststation.com
Fri Aug 9 20:09:53 GMT 2002
On Fri, 9 Aug 2002, David Cougle wrote:
> fmask and dmask setting make it work, but ONLY for shared dir, not it's
> the subdirs do not allow creation/deletion/update of files.
Could you please show exactly what you get, ie 'ls -al' in the mount dir
and in one subdir?
The dir and file modes are faked by smbfs, based on the values you give
it. The code looks like this
fattr->f_mode = server->mnt->file_mode;
if (fattr->attr & aDIR)
fattr->f_mode = server->mnt->dir_mode;
fattr->f_size = SMB_ST_BLKSIZE;
/* Check the read-only flag */
if (fattr->attr & aRONLY)
fattr->f_mode &= ~(S_IWUSR | S_IWGRP | S_IWOTH);
It uses the values it gets at mount time, but if a file or dir has the
"dos" attribute readonly the write permission is removed.
file_mode and dir_mode should be the values you gave. If you run
'cat /proc/mounts' on a recent kernel (2.4.18 at least) it will show you
the values of these variables.
You should also (re-)check that the dirs and files do not have readonly
status on the server.
More information about the samba