Subject: Re: File permissions?
From: [email-masked] (Stuart Williams)

19 Jun 1997 16:11:30 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
References: <[email-masked]>
Reply-To: [email-masked]
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="------------8B7DDB84A7F1BD95D40E1961"
X-Mailer: Mozilla 4.0b5 [en] (Win95; I)
Original-To: Sergey Okhapkin <[email-masked]>
Original-Cc: "[email-masked]" <[email-masked]>,
        "'Hmmmz'" <[email-masked]>
X-Priority: 3 (Normal)
Original-Sender: [email-masked]

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
> "[email-masked]" 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: [email-masked]
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
"[email-masked]" with one line of text: "help".