From: jazz AT softway DOT com (Jason Zions) Subject: Re: File permission _feature_ 21 Nov 1997 05:27:22 -0800 Message-ID: <347505CE.71FD2087.cygnus.gnu-win32@softway.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: gnu-win32 AT cygnus DOT com 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 AT cygnus DOT com" with one line of text: "help".