Bug 444144 - fails to create result dir
fails to create result dir
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: mock (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: David Cantrell
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-25 09:27 EDT by Matthias Clasen
Modified: 2013-01-09 20:49 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-25 15:44:06 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 Matthias Clasen 2008-04-25 09:27:59 EDT
I used to be able to run mock as non-root. When doing that today, I discovered
that mock now uses consolehelper. So far so good, but what is not good is that
it fails with:

ERROR: Could not create dir /var/lib/mock//fedora-9-i386/result. Error: [Errno
13] Permission denied: '/var/lib/mock//fedora-9-i386/result'
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/mock/util.py", line 61, in mkdirIfAbsent
    os.makedirs(dirName)
  File "/usr/lib/python2.5/os.py", line 172, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/var/lib/mock//fedora-9-i386/result'


doing sudo mock ...

works fine.
Comment 1 Michael E Brown 2008-04-25 12:59:34 EDT
To write to /var/lib/mock you must be in the 'mock' group.

If you are not in the mock group, you have to use --resultdir to put the results
somewhere else.
Comment 2 Matthias Clasen 2008-04-25 13:42:11 EDT
I am in the mock group. root is not, and mock suddenly started using
consolehelper...
Comment 3 Michael E Brown 2008-04-25 14:44:21 EDT
what is your $PATH?

Which version of mock?
Comment 4 Matthias Clasen 2008-04-25 14:52:59 EDT
[mclasen@localhost devel]$ echo $PATH
/usr/kerberos/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/home/mclasen/bin
[mclasen@localhost devel]$ rpm -q mock
mock-0.9.9-1.fc9.noarch
Comment 5 Michael E Brown 2008-04-25 15:16:54 EDT
Your path is correct. (sometimes we see issues when people have /usr/sbin in
their path before /usr/bin.)

You are running the latest version. Mock has been using consolehelper since
0.9.0. and F7/F8 were upgraded to 0.9.x in early Feb.

I've seen sometimes where people mess up permissions on /var/lib/mock

Can you send the following:

$ id
$ ls -la /var/lib/mock

On my system:

$ ls -la /var/lib/mock
total 24
drwxrwsr-x  3 root mock 4096 2008-03-13 15:11 .
drwxr-xr-x 36 root root 4096 2008-03-20 13:26 ..
drwxrwsr-x 17 root mock 4096 2008-02-06 15:37 cache


Comment 6 Matthias Clasen 2008-04-25 15:44:06 EDT
Nevermind.
I somehow lost the mock group from my user. Reinstating it makes things work again.
Sorry for wasting your time

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