|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 0565 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 0565.
Report 0565 Actions
Problem Report Number 0565 Submitter's Classification Test Suite problem State Resolved Resolution Rejected (REJ) Problem Resolution ID REJ.X.0169 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published null Product Standard Commands and Utilities V3 (UNIX 98) Certification Program The Open Brand certification program Test Suite VSC version 5.0.1 Test Identification POSIX.cmd/cp 1004 Problem Summary PG4C.00108 This IR claims that recursively copied directories be created using only umask before subdirectories and files are copied. Problem Text
Assertion 1004 calls ga10.sh to test cp -R using different umask
settings. The tests attempts to use a umask of 0177, this will
create the toplevel directory copied with permissions of
rw-------. This will not allow the creation of any files or
directories in the directory created. Thus the cp -R fails because
the lower level directories/files can not be created. The code in
ga10 is the following:
# Try umask=0177 = --xrwxrwx = "u=rw,go-rwx"
umask u=rw,go-rwx
rm -rf $_ga10_newfile
eval $@ > /dev/null 2>&1
_mode=`GetFileData $_ga10_newfile Mode`
rm -rf $_ga10_newfile
# Determine expected mode:
_expected_mode=`_ga10_check_mode -$_lltype $_lltype$_defaultmode
`
if ! expr "X$_mode" : "X$_expected_mode" >/dev/null 2>&1
then
umask $_savemask
echo "Failure: file mode '$_mode' did not match RE '$_ex
pected_mode'."
return $VSC_FAILURE
fi
The no permission error message in the ga10_errlog is from the
eval $@ line. The other error is because the directory was not
created.Test Output
***********************************************************************
/tset/POSIX.cmd/cp/cp.sh 1 Failed
Test Information:
Assertion #1004 (A): LFS: Test of GA10 - cp creates files wit
<LC> h correct attributes.
TEST: /tsuites/testfs/LargeFileSystem/dircp1004b.tmp/dircp10
<LC> 04a.tmp
TEST: /tsuites/testfs/LargeFileSystem/dircp1004c.tmp/dircp10
<LC> 04a.tmp/dircp1004z.tmp
Contents of ga10_errout:
/tsuites/testfs/LargeFileSystem/dircp1004c.tmp/dircp1004a.tm
<LC> p/dircp1004z.tmp: No permission
Failure: file mode '' did not match RE 'drw[a-rt-zA-Z-]--[a-
<LC> rt-zA-Z-]--[a-rt-zA-Z-]'.
***********************************************************************
Review Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
We recommend this request be refused.
We believe the test is correct. The standard for cp states in
the Description section:
2.
e. If the directory dest_file does not exist, it will be created
with file permission bits set to the same value as those of
source_file, modified by the file creation mask of the user if
the -p option was not specified, and then bitwise inclusively
ORed with S_IRWXU.
This requires created directories explicitly allow read/write/execute
for the owner, but to preserve the permissions for group and other.
The IUT is not conforming to this requirement.
Read/write/execute permission is necessary for files to be copied into
the directory in step f. Otherwise, readonly directories cannot be
copied recursively.
f. The files in the directory source_file will be copied to the
directory dest_file, taking the four steps [1-4] listed here
with the files as source_files.
Finally, the proper directory permissions are set for the directory in
step g:
g. If dest_file was created, its file permission bits will be
changed (if necessary) to be the same as those of source_file,
modified by the file creation mask of the user if the -p
option was not specified.
Given the following directory/file combination
dir1 perm=777 rwxrwxrwx
dir1/file1 perm=666 rw-rw-rw-
The sequence of events occurring for cp -R dir1 dir2 when umask
is set to 177 are as follows:
# Create the directory
mkdir dir2
# use umask, but allow files to be manipulated by
# owner, so with umask 177 we get an initial mode of
# 600 or'ed with 700 (S_IRWXU).
chmod dir2 to (600 | 700) = rw------- | rwx------ = rwx------
# copy subdirectory files
cp dir1/file1 dir2/file1
# fix up permissions to reflect what it should have been for
# a newly created directory
chmod dir2 to 600 = rw-------
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Rejected (REJ) Review Conclusion
This request is refused.
Problem Reporting System Options:
- View Report 0565
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority