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

daniel.jarboe at custserv.com daniel.jarboe at custserv.com
Wed Nov 27 21:07:01 GMT 2002


True, but was his desire to prevent deletion of the directory, like in
DOS?

C:\>mkdir test
C:\>attrib +r test
C:\>rmdir test
Access is denied.
C:\>attrib -r test
C:\>rmdir test

This works on windows mapped shares, but not on samba.

~ Daniel

-----Original Message-----
From: jra at dp.samba.org [mailto:jra at dp.samba.org] 
Sent: Wednesday, November 27, 2002 3:54 PM
To: Dragan Krnic
Cc: samba at lists.samba.org; dkrnic at t-online.de
Subject: Re: [Samba] "attrib +R myowndir" fails to write-protect my own
dir


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.
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba

-----------------------------------------------------------------------

This message is the property of Time Inc. or its affiliates. It may be
legally privileged and/or confidential and is intended only for the use
of the addressee(s). No addressee should forward, print, copy, or
otherwise reproduce this message in any manner that would allow it to be
viewed by any individual not originally listed as a recipient. If the
reader of this message is not the intended recipient, you are hereby
notified that any unauthorized disclosure, dissemination, distribution,
copying or the taking of any action in reliance on the information
herein is strictly prohibited. If you have received this communication
in error, please immediately notify the sender and delete this message.
Thank you.




More information about the samba mailing list