Using umask instead of explicit mode bits to create files/directories

Robert Dahlem Robert.Dahlem at
Wed Dec 6 08:31:28 GMT 2000


On Tue, 05 Dec 2000 20:40:20 +0100, Robert Dahlem wrote:

>>	Ok, what's your current reccomendation, and
>>	does it apply to 2.2.0?

>I would be happy to provide a patch against 2.2.0 (this will be 
>against smbd/vfs.c:vfs_mkdir()) 

Ok, I prepared a preliminary patch against 2.2.0-alpha1. It compiles 
cleanly on my system, but its only a dry run, cause I don't have no 
ACLs. The patch is attached.

>but I need some more information because I don't have access to a 
>system with ACL support:
>Is a default ACL possible wich negotiates down what we set with
>   umask(0); mkdir("something", 0777);
>In other words: does stat("something", &sbuf) always return
>sbuf.st_mode=0777 or could it return something like 0755 because ACLs
>prevent write access for group and others?
>The latter case would complicate things a bit. :-)

My patch assumes the complicated situation. :-)

Johannes, could you test this against 2.2.0-alpha1?

It's only for mkdir() at the moment because vfs_open() is not defined 
in smbd/vfs.c and after staring at the code for two hours I could not 
figure out how to add a new vfs_XXX() function, its just too 
complicated for me. Anyone with a helpful hand? :-)


Robert.Dahlem at           Fax +49-69-432647

Sent using PMMail ( - fast, decent, email
software; far better than Outlook. Try it sometime.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/octet-stream
Size: 2332 bytes
Desc: not available
Url :

More information about the samba-technical mailing list