public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Larry Hall (Cygwin)" <reply-to-list-only-lh@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: NTFS write-protect flag translation (tar? rsync?) only one-way?
Date: Wed, 06 Apr 2011 06:54:00 -0000	[thread overview]
Message-ID: <4D9BC305.9030201@cygwin.com> (raw)
In-Reply-To: <000001cbf3f2$843bd520$8cb37f60$@com.au>

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.

> By the looks of it (see
> http://sourceware.org/ml/cygwin/2002-05/msg00317.html), this problem has
> been addressed and potentially solved before, so I wonder if something is
> broken here.

No, nothing is broken.  Things have changed since 2002.  If you want the gory
details, you can look in the email archives.  The short of it is, making
read-only, Windows ACLs, and POSIX permissions all agree is overly
complicated.  So we've dropped read-only support now.

> The background to all this is that I am using RCS (I know, almost as
> anachronistic as the read-only attribute, but that's dictated by my
> workplace) under both Windows and Linux and RCS relies heavily on the
> read-only attribute of files to be correct. IMO, it wouldn't hurt if the
> Cygwin tools would write the Windows read-only attribute when they create a
> Cygwin read-only file?

Cygwin has a package for RCS.  Perhaps that could solve your problem?

-- 
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

  reply	other threads:[~2011-04-06  1:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-06  6:16 Christian Gelinek
2011-04-06  6:54 ` Larry Hall (Cygwin) [this message]
2011-04-07  6:01   ` Christian Gelinek
2011-04-18 10:25   ` Corinna Vinschen
  -- strict thread matches above, loose matches on Subject: below --
2011-04-05 13:04 Christian Gelinek
2011-04-05 21:46 ` Larry Hall (Cygwin)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D9BC305.9030201@cygwin.com \
    --to=reply-to-list-only-lh@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).