Bug 444144 - fails to create result dir
Summary: fails to create result dir
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: David Cantrell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-04-25 13:27 UTC by Matthias Clasen
Modified: 2013-01-10 01:49 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-04-25 19:44:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Matthias Clasen 2008-04-25 13:27:59 UTC
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 16:59:34 UTC
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 17:42:11 UTC
I am in the mock group. root is not, and mock suddenly started using
consolehelper...

Comment 3 Michael E Brown 2008-04-25 18:44:21 UTC
what is your $PATH?

Which version of mock?


Comment 4 Matthias Clasen 2008-04-25 18:52:59 UTC
[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 19:16:54 UTC
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 19:44:06 UTC
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.