dos_mkdir(), was: 2.0.7: inherit permissions = yes breaks setting read-only on files

Robert Dahlem Robert.Dahlem at gmx.net
Sun Aug 27 16:50:33 GMT 2000


Helge,

On Sun, 27 Aug 2000 18:37:41 +0200, Helge Blischke wrote:

>> No, it does not. Try:
>> 
>>     as user joe
>>     $ cd
>>     $ mkdir upper_dir
>>     $ chmod 777 upper_dir
>>     $ cd upper_dir
>>     $ mkdir lower_dir
>>     $ chmod 000 lower_dir
>>     now as user scott
>>     $ rmdir ~joe/upper_dir/lower_dir
>> 
>> No problem to delete the directory. Joe will have to
>> 
>>     $ chmod +t ~/upper_dir
>> 
>> to prevent it.
>> 

>What I suggested was - emulated as shell commands as you did:
>as user joe
>$ cd
>$ mkdir -m 0 upper_dir # upper_dir is not accessible by anyone except
>owner and root; see (1) below
>$ chmod 01777 upper_dir # has now rwxrwxrwt
>$ cd upper_dir
>$ mkdir -m 0 lower_dir # see (2) below
>
>(1) user scott tries
>$ rmdir ~joe/upper_dir
>UX:rmdir: ERROR: upper_dir: Not privileged
>
>(2) user scott tries at this time
>$ rmdir ~joe/upper_dir/lower_dir
>UX:rmdir: ERROR: /home/joe/upper_dir/lower_dir: Not privileged
>
>Any more questions?

Sorry, if I missed your point but I think you missed the point. :-)

The problem we were originally talking about exists only when upper_dir
already exists and is world- (or scott-) writable, for example when
creating subdirectories in /tmp.

For point (1) you are right only as long as ~joe is not writeable for
scott, but that's not the critical point. World and/or group writeable
directories are the point and this can be handled with the sticky
directory bit. No need for any emulation as far as I can see it, but
I'm always willing to learn. :-)

Regards,
        Robert

---------------------------------------------------------------
Robert.Dahlem at gmx.net           Fax +49-69-432647
---------------------------------------------------------------






More information about the samba-technical mailing list