|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0677 Details
Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges
This page provides all information on Problem Report 0677.
Report 0677 Actions
Problem Report Number 0677 Submitter's Classification Specification problem State Resolved Resolution Permanent Interpretation (PIN) Problem Resolution ID PIN.X.0070 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published 1997-09-16 08:00 Product Standard Commands and Utilities V2 (UNIX 95) Certification Program The Open Brand certification program Test Suite VSC version 4.1.6 Test Identification POSIX.cmd/mkdir/mkdir 20 Specification Commands and Utilities Issue 4 Version 2 Location in Spec See Problem Text Problem Summary PIN4C.00044 This test may fail on implementations since the -m mode interaction with umask has been ruled unclear. Problem Text
Mkdir's interaction with the current umask setting is undefined,
therefore, we request a temporary interpretation allowing historical
practice.
Test Output
200|220 1 20:15:21|TP Start
520|220 1 1979711496 1 1|Assertion #20 (A): Check -m mode in general with nonze
520|220 1 1979711496 1 2| <LC> ro umask
520|220 1 1979711496 1 11|Note: The behavior associated with this assertion is
520|220 1 1979711496 1 12| <LC> currently
520|220 1 1979711496 1 13|the subject of an IEEE POSIX.2 interpretation request
520|220 1 1979711496 1 14| <LC> and may
520|220 1 1979711496 1 15|change in a future revision of POSIX.2.
520|220 1 1979711496 1 16|Command failed: 'expr "Xdr--r-xr--" : 'Xdr-[a-z-]r-[a
520|220 1 1979711496 1 17| <LC> -z]rw[A-Z-]' >/dev/null 2>&1'
220|220 1 1 20:15:33|FAIL
410|220 20 1 20:15:34|IC EndReview Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
A permanent interpretation is recommended.
The pasc-1003.2-67 interpretation request states
Should mkdir -m mode utilize the current umask in setting permissions?
I would propose that it does not.
The test assertion in 2003.2 Draft 9 say it should based on the
DESCRIPTION for mkdir which says it "shall perform actions equivalent
to the POSIX.1 mkdir()"
However, existing practise in System V (on which the rationale
says this option was added) is to set the permission to the explict
value specified by the mode argument to -m; and the text in lines
6950-6956 state that "The mode option-argument shall be the same as
the mode operand defined for the chmod utility". The chmod utility
ignores the umask.
So for an example, say
$ umask 22
$ mkdir -m 456 foodir
$ ls -ld
gives (on System V)
dr--r-xrw- 2 andrew relx 512 Jul 1 04:29 foodir
whereas the 2003.2 draft wants
dr--r-xr-- 2 andrew relx 512 Jul 1 04:29 foodir
The System V behaviour seems more inituitive as a user, and usage has
been to, in a single command set the mode explicitly with the -m option,
rather than call umask followed by mkdir -m xxx.
My understanding of the rationale text lines 7184-7187 "For example,
by default, the mode of the directory is affected by the file mode
creation mask" is that this does not apply to the -m case, which
is not the default.
The official repsonse is
The standard is unclear on this issue, and no conformance distinction can
be made between alternative implementations based on this. This is being
referred to the sponsor.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Permanent Interpretation (PIN) Review Conclusion
A Permanent Interpretation is granted.
Problem Reporting System Options:
- View Report 0677
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority