Bug 484997 - cpio does not honor system umask correctly.
cpio does not honor system umask correctly.
Status: CLOSED DUPLICATE of bug 484690
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cpio (Show other bugs)
5.4
All Linux
low Severity medium
: rc
: ---
Assigned To: Ondrej Vasik
BaseOS QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-02-10 20:28 EST by Wade Mealing
Modified: 2009-02-10 23:04 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-02-10 23:04:08 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Minor changes from debian patch on same issue. (1.76 KB, patch)
2009-02-10 20:28 EST, Wade Mealing
no flags Details | Diff

  None (edit)
Description Wade Mealing 2009-02-10 20:28:33 EST
Created attachment 331506 [details]
Minor changes from debian patch on same issue.

Description of problem:

cpio provide doesnt honor the umask , i.e When trying to restored files using cpio from the tape drive the directories are created with 700 instead of 755(if umask is 0022). 

Version-Release number of selected component (if applicable):

cpio-2.6-20

How reproducible:

Every time.

Steps to Reproduce:

umask 0022
mkdir -p /tmp/test-tape/dir1/dir2
cd /tmp/test-tape/
touch a b c d e f
cd dir1
touch g h i j k l 
cd dir2
touch m n o p q r 
cd /tmp/test-tape/
ls -l | grep dir1 | awk ' { print $1  } ' 
mkdir -p /tmp/newdir/
find /tmp/test-tape/* -type f -print | cpio -pdvm /tmp/newdir/  &> /dev/null 
ls -l | grep dir1 | awk ' { print $1  } ' 

dir1 should be affected by the umask of the system.

Actual results:

drwxr-xr-x
drwx------

Expected results:

sh testcase.sh
drwxr-xr-x
drwxr-xr-x

Additional info:
Comment 1 Wade Mealing 2009-02-10 23:04:08 EST

*** This bug has been marked as a duplicate of bug 484690 ***

Note You need to log in before you can comment on or make changes to this bug.