delorie.com/archives/browse.cgi | search |
On Wed, Aug 15, 2001 at 11:30:26AM +0200, Tim Van Holder wrote: > > > It actually doesn't work very well on non-NTFS filesystems. That's > > > known. We use what Microsoft provides us and we don't have much > > > to work with on anything besides NTFS. > > That's odd though - regular DOS calls (both the standard and LFN APIs) > that set a files timestamp work just fine on read-only files (looking > in the source for utime on DJGPP, there is no code to chmod +w/-w). > Strange that the Windows APIs work differently. That's simply not correctly explained. The problem is only raised when using NTFS security to get POSIX compliant file attributes (that's called `ntsec' in Cygwin). It's no problem on FAT, FAT32 or even on NTFS if `ntsec' isn't used. MSDN states, that it's neccessary to open a file with GENERIC_WRITE access to be able to change the timestamps. So far the MSDN. Actually it's sufficient to have the permission to set the so called "file attributes" which is Microsofts naming convention for a specific part of the file's metadata. The timestamps are part of these "file attributes" Unfortunately that wasn't a known fact when `utime(s)' was implemented in Cygwin. I have changed `utime(s)' in the current developers version of Cygwin a few minutes ago. On NT/W2K it opens the file now claiming only FILE_WRITE_ATTRIBUTES instead of GENERIC_WRITE as desired access. That works for a simple reason. Even if the owner has no write access to the file's data, (s)he always has write access to the file's attributes, extended attributes and security descriptors (which altogether are the sum of the file's metadata). However, that doesn't change the need for automake to care for Cygwin versions prior to 1.3.3, apparently. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |