From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3321 invoked by alias); 5 Apr 2011 15:50:19 -0000 Received: (qmail 3297 invoked by uid 22791); 5 Apr 2011 15:50:13 -0000 X-SWARE-Spam-Status: No, hits=3.2 required=5.0 tests=AWL,BAYES_00,BOTNET,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from vms173003pub.verizon.net (HELO vms173003pub.verizon.net) (206.46.173.3) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 05 Apr 2011 15:50:09 +0000 Received: from [10.0.0.2] ([unknown] [108.7.36.4]) by vms173003.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LJ600CP8RYUPF00@vms173003.mailsrvcs.net> for cygwin@cygwin.com; Tue, 05 Apr 2011 10:49:47 -0500 (CDT) Message-id: <4D9B3A18.1050602@cygwin.com> Date: Tue, 05 Apr 2011 21:46:00 -0000 From: "Larry Hall (Cygwin)" Reply-to: cygwin@cygwin.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.21) Gecko/20090320 Remi/2.0.0.21-1.fc8.remi Lightning/0.9 Thunderbird/2.0.0.21 Mnenhy/0.7.5.0 MIME-version: 1.0 To: cygwin@cygwin.com Subject: Re: NTFS write-protect flag translation (tar? rsync?) only one-way? References: <003c01cbf364$23257e50$69707af0$@com.au> In-reply-to: <003c01cbf364$23257e50$69707af0$@com.au> Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 7bit 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/msg00075.txt.bz2 On 4/5/2011 3:36 AM, Christian Gelinek wrote: > Hi everyone, > > I have a problem with the tar command with the "extract permissions > information" option being set. > > I am running Cygwin (CYGWIN_NT-6.1-WOW64 1.7.8(0.236/5/3) 2011-03-01 09:36) > under Windows 7 (Windows 7 Professional N Ver 6.1 Build 7600) with NTFS and > the CYGWIN=ntsec environment variable. > > 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. -- Larry _____________________________________________________________________ A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting annoying in email? -- 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