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

Dragan Krnic dkrnic at lycos.com
Sun Dec 1 19:24:00 GMT 2002


Hi Jeremy,

after commenting out part of the line following the infamous
quote "We never make directories read only for the owner..."
in "samba/source/smbd/dosmode.c" as follows:

   - result |= (S_IFDIR | S_IWUSR);
   + result |= (S_IFDIR /* | S_IWUSR /* 2002/12/01*/ );

I can make my own directories read-only. The advantage is that
with this modification "special" folder links get stored on 
samba server with correct attributes and can be recovered
with them at every new login, thus preserving the "magic" of
so many tricky treats in the profile.

The disadvantage is that if I wants to create another file or
delete an existing one from such read-only directory, I need
to first restore writeability (remove read-only).

The advantage far offsets the disadvantage.

Thanks a lot for the tip.

Dragan


_____________________________________________________________
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