X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Thu, 7 Jan 2010 19:02:14 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: 1.7.1-1 noacl on samba share has incorrect directory write bit
Message-ID: <20100107180214.GP23972@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <4B454550.9020806@fastmail.fm>  <4B454E96.7060009@cygwin.com>  <4B45739C.4060807@fastmail.fm>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4B45739C.4060807@fastmail.fm>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Jan  7 00:39, Raman Gupta wrote:
> Well... yes -- at least in this case. As per the documentation
> (http://www.cygwin.com/cygwin-ug-net/using.html#mount-table):
> 
> "Cygwin ignores filesystem ACLs and only fakes a subset of
> permission bits based on the DOS readonly attribute"
> 
> On the server:
> 
> root@smserver foo]# ls -ald bar baz
> dr-xr-sr-x. 2 root agroup 4096 2007-04-21 23:23 bar
> drwxrwsr-x. 2 root agroup 4096 2007-04-21 23:23 baz
> 
> Since the default behavior of Samba is to map the DOS read-only flag
> as per the write bits (http://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html#MAPREADONLY),
> the write bits carry over to the DOS readonly attribute on the
> share. This can be verified via the DOS attrib command on the
> client:
> 
> Raman Gupta@client /mnt/shar/foo
> $ attrib bar
>      R     \\smserver\smshare\foo\bar
> 
> Raman Gupta@client /mnt/shar/foo
> $ attrib baz
>            \\smserver\smshare\foo\baz
> 
> and yet, Cygwin reports owner write bit set in both cases:
> 
> Raman Gupta@client /mnt/shar/foo
> $ ls -ald bar baz
> drwxr-xr-x 1 Raman Gupta None 0 2007-04-21 23:23 bar
> drwxr-xr-x 1 Raman Gupta None 0 2007-04-21 23:23 baz
> 
> Therefore, it appears that cygwin is following its own documentation
> for files but not for directories.

No, it's a bit more tricky.  FAT filesystems, which are the role model
for noacl filesystems don't know something like a R/O directory.  The
DOS R/O bit on a directory does NOT mean the directory is R/O.  Rather,
it only means that the folder is some sort of special folder.  For some
better description, see http://support.microsoft.com/kb/326549.

Therefore the fault is not on Cygwin's side, but on Samba's side to use
the DOS R/O bit for something different than Windows uses it on
directories.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

