[Samba] "attrib +R myowndir" fails to write-protect my own dir

Dragan Krnic dkrnic at lycos.com
Wed Nov 27 21:34:00 GMT 2002


I'm so glad there are kind souls at this time of night. Wait, it might
be day at your place. Good day!

I don't see a contradiction in setting Readonly flag on one's own
directories and then creating files in them anyways. It's very much 
like any overruling root privilege. It's just a flag, Jeremy, it's 
not our saviour's gospel. Bill knows we don't march over dead bodies 
and he's taking unfair advantage of it.

I propose a new smb.conf feature for 3.0:

   [homes & especially profiles]
      overrule readonly dirs = Yes/No

Default is "No", but in exceptional cases, like on almost every samba
server, it may be enabled to write into one's own write-protected directories, salvation be damned.

So it's not like samba team is committing a sin, but on the other
hand how far would you go to deny your neighbour a glass of beer if 
he's thirsty, no matter what the Q'uran says.

Regards
Dragan


On Wed, 27 Nov 2002 20:54:12  
 jra wrote:
>On Wed, Nov 27, 2002 at 07:23:30PM +0100, Dragan Krnic wrote:
>> A trivial case:
>> 
>> executing the following DOS command from the prompt line on a Win2K SP3:
>> 
>>    %windir%\system32\attrib.exe +R H:\dir
>> 
>> can't set the R(eadonly) flag on my home dirs (2.2.7):
>> 
>>    drwxrwsr-x  4  me  users  4096 Nov 27 17:59 .
>>    drwxr-sr-x  2  me  users  4096 Nov 27 17:59 dir
>>    -r--r--r--  1  me  users     0 Nov 27 17:59 empty.txt
>>    drwxr-sr-x  2  me  users  4096 Nov 27 17:27 profile
>
>This is by design. From the source code :
>
>  if (IS_DOS_DIR(dosmode)) {
>    /* We never make directories read only for the owner as under DOS a user
>       can always create a file in a read-only directory. */
>
>Jeremy.
>


_____________________________________________________________
Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus



More information about the samba mailing list