Bug 1805 - man smb.conf: mode specified when creating the directory is a nonsense
Summary: man smb.conf: mode specified when creating the directory is a nonsense
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Docs (show other bugs)
Version: 3.0.6
Hardware: All All
: P3 major
Target Milestone: none
Assignee: John H Terpstra (mail address dead(
QA Contact: Samba Documentation QA Contact~
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-22 06:22 UTC by Clock
Modified: 2007-05-07 05:50 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Clock 2004-09-22 06:22: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.

__________
Comment 1 Gerald (Jerry) Carter (dead mail address) 2005-02-01 12:01:43 UTC
updating qa contact
Comment 2 Jelmer Vernooij 2005-09-24 04:18:59 UTC
reassigning doc bug to John 
Comment 3 John H Terpstra (mail address dead( 2005-10-21 17:28:52 UTC
Is this still an issue?

- John T.
Comment 4 Karolin Seeger 2007-05-07 05:50:21 UTC
"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.