Bug 614834

Summary: mock gets permission denied
Product: [Fedora] Fedora Reporter: Pierre Ossman <ossman>
Component: mockAssignee: David Cantrell <dcantrell>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: dcantrell, mebrown, williams
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-15 11:56:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pierre Ossman 2010-07-15 11:14:36 UTC
Description of problem:
Whenever I try to run mock on my F13 system, I get the following:

INFO: mock.py version 1.1.1 starting...
State Changed: init plugins
State Changed: start
INFO: Start(/home/ossman/rpm/SRPMS/cendio-build-utils-1.1-1.src.rpm)  Config(epel-5-i386)
State Changed: lock buildroot
State Changed: clean
State Changed: init
ERROR: Could not create dir /var/lib/mock/epel-5-i386/result. Error: [Errno 13] Permission denied: '/var/lib/mock/epel-5-i386/result'
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/mock/util.py", line 60, in mkdirIfAbsent
    os.makedirs(dirName)
  File "/usr/lib64/python2.6/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/var/lib/mock/epel-5-i386/result'
ERROR: Exception(/home/ossman/rpm/SRPMS/cendio-build-utils-1.1-1.src.rpm) Config(epel-5-i386) 0 minutes 0 seconds
INFO: Results and/or logs in: /var/lib/mock/epel-5-i386/result
ERROR: Could not create dir /var/lib/mock/epel-5-i386/result. Error: [Errno 13] Permission denied: '/var/lib/mock/epel-5-i386/result'

I am provided with the consolehelper dialog so it should be getting the privileges needed. There is also nothing wrong with the installation of the package:

$ rpm -V mock

$

Here's the relevant directory:

$ ll -a /var/lib/mock/epel-5-i386/
total 12
drwxrwsr-x 3 root mock 4096 Jul 15 13:12 .
drwxrwsr-x 3 root mock 4096 Jul 15 13:12 ..
drwxrwsr-x 2 root mock 4096 Jul 15 13:12 root

Comment 1 Pierre Ossman 2010-07-15 11:56:49 UTC
Never mind. I'm an idiot. I had reinstalled this machine since the last time I used mock, and I had simply forgotten to add my user to the mock group.