This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: File permission _feature_


In the Unix world, a change of the file permission writes on the
     i-node, not the file, hence the file content remains unaltered.

According to POSIX.1, chmod() should mark st_ctime for update. That is,
a subsequent stat() on the file should see a changed st_ctime.

POSIX.1 requires three separate file times be maintained for a file.
While NTFS supports all three times, Win32 only gives access to a single
file time. So the question for the implementation is this: which of the
three POSIX.1 times, st_atime, st_mtime, and st_ctime, should be
reflected in the single file time available to you?

Given only the single time, I believe one appropriate implementation
choice is to update the single time for any action for which POSIX.1
says any of the three POSIX times should be updated. This will cause
programs which look for time changes to be awakened more often than they
would be on a real Unix system, but they won't miss wake-ups, and I
would suggest that is the better course of action.

Needless to say, OpenNT's POSIX subsystem maintains all three times
correctly. :-)

Jason Zions
Softway Systems, makers of OpenNT

NOTE: Although I am chair of IEEE PASC System Services Working Group
(the folks who maintain POSIX.1 and its amendments), this is not an
official statement of IEEE PASC, IEEE-CS, or the IEEE.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]