Bug 165069 - mock throws IO error when run with restrictive umask
mock throws IO error when run with restrictive umask
Product: Fedora
Classification: Fedora
Component: mock (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2005-08-03 22:33 EDT by Jeff Sheltren
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-08-04 16:53:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
proposed patch (430 bytes, patch)
2005-08-03 22:33 EDT, Jeff Sheltren
no flags Details | Diff

  None (edit)
Description Jeff Sheltren 2005-08-03 22:33:53 EDT
Description of problem:
mock errors out if user's umask is too restrictive.

Steps to Reproduce:
1. umask 0077
2. mock some.src.srpm
Actual results:
Traceback (most recent call last):
  File "mock.py", line 786, in ?
  File "mock.py", line 774, in main
  File "mock.py", line 308, in build
    srpm_out = self.install_build_deps(srpm)
  File "mock.py", line 233, in install_build_deps
    shutil.copy2(srpm, dest)
  File "/usr/lib64/python2.4/shutil.py", line 92, in copy2
    copyfile(src, dst)
  File "/usr/lib64/python2.4/shutil.py", line 48, in copyfile
    fdst = open(dst, 'wb')
IOError: [Errno 13] Permission denied:

Expected results:
Should rebuild srpm

Additional info:
It'd be nice if this would work even when user's umask is restrictive.  I'm
proposing this patch which sets the umask to 0022 before doing work in the chroot.
Comment 1 Jeff Sheltren 2005-08-03 22:33:53 EDT
Created attachment 117429 [details]
proposed patch
Comment 2 Seth Vidal 2005-08-04 16:53:25 EDT

Comment 3 Seth Vidal 2005-08-04 16:55:15 EDT
not notabug - next release

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