delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/08/14/09:22:29

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
Date: Tue, 14 Aug 2001 15:22:17 +0200
From: Corinna Vinschen <vinschen AT redhat DOT com>
To: cygdev <cygwin-developers AT cygwin DOT com>
Subject: Re: readonly, NTFS, and file metadata
Message-ID: <20010814152217.G17709@cygbert.vinschen.de>
Reply-To: cygdev <cygwin-developers AT cygwin DOT com>
Mail-Followup-To: cygdev <cygwin-developers AT cygwin DOT com>
References: <3B783E6E DOT 2546DF0 AT ece DOT gatech DOT edu> <20010814120018 DOT D17709 AT cygbert DOT vinschen DOT de> <20010814121021 DOT E17709 AT cygbert DOT vinschen DOT de> <3B792C0D DOT 5FADF8A AT yahoo DOT com>
Mime-Version: 1.0
User-Agent: Mutt/1.2.5i
In-Reply-To: <3B792C0D.5FADF8A@yahoo.com>; from earnie_boyd@yahoo.com on Tue, Aug 14, 2001 at 07:47:57AM -0600

On Tue, Aug 14, 2001 at 07:47:57AM -0600, Earnie Boyd wrote:
> Corinna Vinschen wrote:
> > 
> > On Tue, Aug 14, 2001 at 12:00:18PM +0200, Corinna Vinschen wrote:
> > > On Mon, Aug 13, 2001 at 04:54:06PM -0400, Charles Wilson wrote:
> > > > There is an ongoing thread on the automake list (started by yours truly,
> > > > agent provocateur) concerning some strangeness I've encountered on
> > > > NTFS(ntsec), with 'cp -p' and readonly files.  The URL for the beginning
> > > > [...]
> > > > What happens is this: first, foo is copied to bar, with perms
> > > > -r--r--r--.  But, the timestamp is wrong.  Since cp was called with
> > > > '-p', cp then tries to set the timestamp of bar to match foo.  But it
> > > > can't on cygwin.  On linux, it can.
> > > >
> > > > My suggestion to the automake list, which was to make foo be -rw-r--r--,
> > > > was not well received.  The suggestion in return was: make cygwin act
> > > > like linux.  I can't really argue against that, since that's been our
> > > > stated goal anyway.
> > > >
> > > > Does anybody know offhand what it would take to 'linux-ize' this
> > > > behavior (e.g. would we have to take a performance hit?)  Do we want to
> > > > be like linux in this particular? Also, please check the thread
> > > > referenced above.
> > >
> > > Check return code of SetFileTime(), check if ntsec ON and
> > > file is on NTFS, get current ACL, modify to have write_data
> > > access for current user, call SetFileTime() again, reset ACL.
> > >
> > > The only problem is that we need a new function set which
> > > _exactly_ saves and restores a given ACL and another function
> > > which exactly adds write access to the current user. The
> > > standard functions in security.cc are not appropriate.
> > 
> > Wait, that's not quite true. read_sd() and write_sd() are
> > the functions to save and restore a SD. So there's only
> > a function to set write access for the current user missing...
> > 
> > Is it true that the problem can be restricted to files
> > which are actually owned by the current user???
> > 
> 
> But, this only solves it for NTFS with ntsec set.  What about FAT?  I

It doesn't happen on FAT. It could happen on NTFS with files
created by native Windows apps and ntsec OFF as well, though.

> think that it is wrong of automake maintainers to be so narrow minded. 

I agree that it make sense to change automake maintainers minds.
However, that shouldn't keep us from adding extra functionality
to utimes() for that case to be as POSIX conformant as possible. 
There's just no reason to tell'em ;-)

> I plan to join that discussion.

Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019