delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/06/19/16:11:30

From: skw AT hplb DOT hpl DOT hp DOT com (Stuart Williams)
Subject: Re: File permissions?
19 Jun 1997 16:11:30 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <33A9B4DB.23098E61.cygnus.gnu-win32@hplb.hpl.hp.com>
References: <01BC7CBF DOT A6328DE0 AT gater DOT krystalbank DOT msk DOT ru>
Reply-To: skw AT hplb DOT hpl DOT hp DOT com
Mime-Version: 1.0
X-Mailer: Mozilla 4.0b5 [en] (Win95; I)
Original-To: Sergey Okhapkin <sos AT prospect DOT com DOT ru>
Original-Cc: "gnu-win32 AT cygnus DOT com" <gnu-win32 AT cygnus DOT com>,
"'Hmmmz'" <garbanzo AT hooked DOT net>
X-Priority: 3 (Normal)
Original-Sender: owner-gnu-win32 AT cygnus DOT com

This is a multi-part message in MIME format.
--------------8B7DDB84A7F1BD95D40E1961
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I had a similar problem when I tried building RCS. The -M
option on 'co' which restores the last modification time 
failed. I tracked through the implementation of 'utime()'
in 'cygwin.dll' (in winsup/times.cc). It uses calls
the Win32 SetFileTime() function to modify the file time.
SetFileTime needs a handle with a *write* lock on the
file whose time is being modified. So... if the file
is read only, the call to utime() fails because the 
implementation cannot get the write lock that it needs
to modify the time.

My work around in RCS was to alter the order in which
the modification time and the the final file mode were
set so that the file was still writeable when utime was
called.

Hope this helps.

Regards

Stuart Williams.


Sergey Okhapkin wrote:
> 
> Hmmmz wrote:
> >
> > Whenever I extract a tarfile that apparently changes the default
> > permissions on a file i get an error like so:
> >
> > tar: Could not change access and modification times of
> > readline-2.1/support: Permission denied
> >
> > I have gotten this on Win95 (vfat) Win95 OSR2 (fat32) and NT4 (ntfs)
> > running as administrator on NT.
> >
> 
> It seems to me, it's impossible to change timestamps of directories on win32...
> 
> --
> Sergey Okhapkin, http://www.lexa.ru/sos
> Moscow, Russia
> Looking for a job.
> 
> -
> For help on using this list (especially unsubscribing), send a message to
> "gnu-win32-request AT cygnus DOT com" with one line of text: "help".
--------------8B7DDB84A7F1BD95D40E1961
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Stuart Williams
Content-Disposition: attachment; filename="vcard.vcf"

begin:          vcard
fn:             Stuart Williams
n:              Williams;Stuart
org:            Hewlett-Packard Laboratories
adr:            Hewlett-Packard Laboratories;;Filtion Road, ;Stoke Gifford,;Bristol;BS12 6QZ;UK
email;internet: skw AT hplb DOT hpl DOT hp DOT com
tel;work:       +44 1179 228285
tel;fax:        +44 1179 229286
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
end:            vcard


--------------8B7DDB84A7F1BD95D40E1961--

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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