Bug 468810 - Permission denied: '/var/lib/mock//fedora-rawhide-i386/result
Summary: Permission denied: '/var/lib/mock//fedora-rawhide-i386/result
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 12
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Cantrell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-28 05:48 UTC by Ralf Corsepius
Modified: 2013-01-10 04:52 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-27 18:43:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch to catch exception and print friendly error. (2.43 KB, patch)
2008-11-18 23:32 UTC, Michael E Brown
no flags Details | Diff

Description Ralf Corsepius 2008-10-28 05:48:56 UTC
Description of problem:

# mock -r fedora-rawhide-i386 init
You are attempting to run "mock" which requires administrative
privileges, but more information is needed in order to do so.
Authenticating as "root"
Password: 
INFO: mock.py version 0.9.12 starting...
State Changed: init plugins
State Changed: start
State Changed: lock buildroot
State Changed: clean
State Changed: init
ERROR: Could not create dir /var/lib/mock//fedora-rawhide-i386/result. Error: [Errno 13] Permission denied: '/var/lib/mock//fedora-rawhide-i386/result'
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/mock/util.py", line 62, in mkdirIfAbsent
    os.makedirs(dirName)
  File "/usr/lib/python2.5/os.py", line 171, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/var/lib/mock//fedora-rawhide-i386/result'
ERROR: Could not create dir /var/lib/mock//fedora-rawhide-i386/result. Error: [Errno 13] Permission denied: '/var/lib/mock//fedora-rawhide-i386/result'

Version-Release number of selected component (if applicable):
mock-0.9.12-1.fc10.noarch

How reproducible:
Always.

Steps to Reproduce:
1. make sure user is not in group "mock"
2. run "mock -r fedora-rawhide-i386 init"

Actual results:
c.f. above.

Expected results:
Function. IMO, mock should either work without any complaint or to refuse working with a clear messages.

That said, IMO this behavior is multiply broken:
* this interactive "login as root" is silly. mock should abort with a proper error message if something (permissions) doesn't fit.
* letting users run into tracebacks is dirty coding (== bug). mock should abort with a proper error message, if something doesn't fit.
* As mock requires special privileges and is not "runable by arbitrary users", mock should be moved to /usr/sbin.

Comment 1 Michael E Brown 2008-11-18 23:31:31 UTC
use --resultdir= to put the build products elsewhere, and everything will work ok.

Comment 2 Michael E Brown 2008-11-18 23:32:55 UTC
Created attachment 323981 [details]
patch to catch exception and print friendly error.

Comment 3 Bug Zapper 2008-11-26 04:21:02 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 4 Jesse Keating 2009-02-06 00:00:00 UTC
This was built for rawhide.

Comment 5 Amit Shah 2010-02-24 15:05:24 UTC
This behaviour still persists with mock in F12.


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