From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7735 invoked by alias); 18 Apr 2011 08:44:44 -0000 Received: (qmail 7656 invoked by uid 22791); 18 Apr 2011 08:44:20 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Mon, 18 Apr 2011 08:44:00 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 2B2CD2C0313; Mon, 18 Apr 2011 10:43:57 +0200 (CEST) Date: Mon, 18 Apr 2011 10:25:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: NTFS write-protect flag translation (tar? rsync?) only one-way? Message-ID: <20110418084357.GB25815@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <000001cbf3f2$843bd520$8cb37f60$@com.au> <4D9BC305.9030201@cygwin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4D9BC305.9030201@cygwin.com> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-04/txt/msg00232.txt.bz2 On Apr 5 21:33, Larry Hall (Cygwin) wrote: > On 4/5/2011 8:35 PM, Christian Gelinek wrote: > >From: Cygwin On Behalf Of Larry Hall (Cygwin) > >>On 4/5/2011 3:36 AM, Christian Gelinek wrote: > >>>It appears that when tar reads files for adding to archives, it > >>>correctly interprets the Windows-set "R" attribute, which is also seen by > >>>ls under Cygwin. After extracting the files using tar though, only > >>>Cygwin's ls command seems to be aware of the read-only attribute; the > >>>attrib command (as well as Explorer and other Windows-apps) see and > >>>handle the file as being writeable. > >> > >>The read-only attribute is a "Windows" thing. Cygwin's utilities focus on > >>supporting POSIXy/Linuxy ways of doing things. You can't expect Cygwin's > >>tools to manage all of Window's permission facilities in the same way as > >>Windows does. The read-only flag is one case where you'll see a divergence. > >>If you need that flag set, you'll need your own wrapper to set it based on > >>the POSIX (or ACL) permissions. The read-only attribute really is quite > >>anachronistic though IMO. It conflicts with the more powerful ACLs. If > >>you have the option, it's better not to use that flag. > > > >IMO the behaviour is inconsistent if the flag is used/interpreted on one (the > >read) operation but NOT being written/changed on the other (write) operation. > >My approach would be either drop it completely or support it on both ends > >(the preferred option). > > Actually, the read-only attribute is not used by Cygwin to determine POSIX > permissions. Actually if it is set it is used to remove the write bits from the permission bits in calls to stat. However, since the DOS attributes are only in the way in terms of POSIX permissions, it's never set in calls to chmod. 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