Bug 181521 - restrictive umask breaks mock
restrictive umask breaks mock
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: mock (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-14 14:58 EST by Jason Corley
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 0.7.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-06-14 16:24:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jason Corley 2006-02-14 14:58:38 EST
Description of problem:
Default umask at NCSU is 0077 and I've discovered this doesn't play well with mock.

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

How reproducible:
always

Steps to Reproduce:
$ umask
77
$ mock /path/to/srpm
init
clean
prep
setup
Traceback (most recent call last):
  File "/usr/bin/mock", line 786, in ?
    main()
  File "/usr/bin/mock", line 774, in main
    my.build(srpm)
  File "/usr/bin/mock", line 308, in build
    srpm_out = self.install_build_deps(srpm)
  File "/usr/bin/mock", line 233, in install_build_deps
    shutil.copy2(srpm, dest)
  File "/usr/lib/python2.3/shutil.py", line 82, in copy2
    copyfile(src, dst)
  File "/usr/lib/python2.3/shutil.py", line 38, in copyfile
    fdst = open(dst, 'wb')
IOError: [Errno 13] Permission denied:
'/var/lib/mock/centos-3-i386/root//builddir/build/originals'  
$ umask 0022
$ mock /path/to/srpm
init
clean
prep
setup
build
ending
done
Results and/or logs in: /var/lib/mock/centos-3-i386/result
$
Comment 1 Clark Williams 2006-04-18 11:06:18 EDT
I tried your test case above with the current mock and didn't have a permissions
problem. 

I notice that there is an explicit umask setting (os.umask(022))in the main
build section of main() in mock.py, but I don't see any note in CVS when that
was added. It's quite possible it was added in response to this bug, just not
annotated such. 

Would you try this again and see if it still fails?

Clark 
Comment 2 Michael E Brown 2007-06-14 16:24:47 EDT
Should be fixed for quite a while now. Closing.

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