This is the mail archive of the
mailing list for the Cygwin project.
Re: NTFS write-protect flag translation (tar? rsync?) only one-way?
- From: "Larry Hall (Cygwin)" <reply-to-list-only-lh at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 05 Apr 2011 11:49:44 -0400
- Subject: Re: NTFS write-protect flag translation (tar? rsync?) only one-way?
- References: <email@example.com>
- Reply-to: cygwin at cygwin dot com
On 4/5/2011 3:36 AM, Christian Gelinek wrote:
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
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.
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
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple