The Samba-Bugzilla – Bug 1805
man smb.conf: mode specified when creating the directory is a nonsense
Last modified: 2007-05-07 05:50:21 UTC
Man smb.conf says:
"inherit acls [...] The default behavior is to use the mode specified
when creating the directory."
I assume that "mode" here means mode in the mkdir glibc call:
man 2 mkdir: "int mkdir(const char *pathname, mode_t mode);
[...] mode specifies the permissions to use."
Samba has no way to determine what mode was used when a mkdir call was made
to make the directory. Noone has a way how to determine it. This is not stored
in the filesystem.
If I make a directory with mkdir with mode=700 and then set the permissions to
777, or make a directory with mode=777 directly, the result will be exactly the
same, with different mode specified on the mkdir call. So samba can't behave as
described in it's manpage and thus the manpage is wrong.
I am curious what the default actually is when I just proved it isn't what is
written in the manpage.
updating qa contact
reassigning doc bug to John
Is this still an issue?
- John T.
"mode" means the unix mode used when creating a new directory.
Samba uses the unix mode of 0777 when creating a new directory in a directory containing default acls if "inherit acls" is set to "yes".
Samba does not need to get the unix mode of the existing parent directory. It is just used for new diretories.
Marking bug as closed.
Please reopen if you are not satisfied with this explanation.