View Issue Details

IDProjectCategoryView StatusLast Update
00003001003.1(2008)/Issue 7System Interfacespublic2013-04-16 13:06
ReporterDon Cragun Assigned Toajosey  
PrioritynormalSeverityObjectionTypeError
Status ClosedResolutionAccepted 
NameDon Cragun
OrganizationSelf
User Referencechmod:implementation defined effect on open file descriptors
Sectionchmod
Page Number655
Line Number22172-22173
Interp Status---
Final Accepted Text
Summary0000300: chmod() should have no effect on open file descriptors referring to files on conforming filesystems
DescriptionThe second paragraph of the APPLICATION USAGE section of chmod() on P657,
L22261-22264 says:
   "Any file descriptors currently open by any process on the file could possibly
    become invalid if the mode of the file is changed to a value which would
    deny access to that process. One situation where this could occur is on a
    stateless file system. This behavior will not occur in a conforming
    environment."

and the requirement that this not occur in a conforming environment matches
the behavior on all conforming file systems on all conforming implementations
of which I am aware.

Therefore, the normative statement in the DESCRIPTION section of chmod() on
P655, L22172-22173:
   "The effect on file descriptors for files open at the time of a call to chmod( )
    is implementation-defined."

makes no sense to me. Access permissions in conforming environments are
determined when a file descriptor is created (e.g., by open(), opendir(), etc.);
not when the file descriptor is used to access a file through the file descriptor.
Further evidence of this is the fact that the standard input and output functions
(e.g., read(), readdir(), write(), etc.) do not have EACCES or EPERM errors specified
by the standard.

Although this paragraph has been in the DESCRIPTION for a long time (it appeared
in X/Open Portability Guide Issue 3 and later, and in POSIX.1 1988 and later), it did
not appear in SVID3. I have not found any rationale explaining why this was included
in the standard and do not believe that it was intentional.
Desired ActionDelete the paragraph on P655, L22172-22713 from the DESCRIPTION section of chmod().
Tagstc1-2008

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2010-07-30 02:56 Don Cragun New Issue
2010-07-30 02:56 Don Cragun Status New => Under Review
2010-07-30 02:56 Don Cragun Assigned To => ajosey
2010-07-30 02:56 Don Cragun Name => Don Cragun
2010-07-30 02:56 Don Cragun Organization => Self
2010-07-30 02:56 Don Cragun User Reference => chmod:implementation defined effect on open file descriptors
2010-07-30 02:56 Don Cragun Section => chmod
2010-07-30 02:56 Don Cragun Page Number => 655
2010-07-30 02:56 Don Cragun Line Number => 22172-22173
2010-07-30 02:56 Don Cragun Interp Status => ---
2010-07-30 02:58 Don Cragun Description Updated
2010-08-19 16:25 nick Status Under Review => Resolved
2010-08-19 16:25 nick Resolution Open => Accepted
2010-08-27 11:14 ajosey Tag Attached: tc1-2008
2013-04-16 13:06 ajosey Status Resolved => Closed