Bug 507375 - Permission error
Permission error
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: mock (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: David Cantrell
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-22 10:47 EDT by Christoph Wickert
Modified: 2013-01-10 00:15 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-18 06:08:24 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 Christoph Wickert 2009-06-22 10:47:55 EDT
Description of problem:
With F-11 (freshly installed) mock I can no longer build packages in mock, every time mock crashes with "permission denied".


$ mock ../../../rpmbuild/SRPMS/xfce4-notes-plugin-1.7.0-1.fc11.src.rpm -r fedora-rawhide-x86_64
State Changed: buildn 0.9.16 starting...
ERROR: Exception(../../../rpmbuild/SRPMS/xfce4-notes-plugin-1.7.0-1.fc11.src.rpm) Config(fedora-rawhide-x86_64) 20 minutes 43 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-rawhide-x86_64/result
Traceback (most recent call last):
  File "/usr/sbin/mock", line 678, in <module>
    main(retParams)
  File "/usr/sbin/mock", line 620, in main
    do_rebuild(config_opts, chroot, args)
  File "<peak.util.decorators.rewrap wrapping __main__.do_rebuild at 0x01E37E60>", line 3, in do_rebuild
  File "/usr/lib/python2.6/site-packages/mock/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/sbin/mock", line 370, in do_rebuild
    chroot.build(srpm, timeout=config_opts['rpmbuild_timeout'])
  File "<peak.util.decorators.rewrap wrapping mock.backend.build at 0x01E31C80>", line 3, in build
  File "/usr/lib/python2.6/site-packages/mock/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.6/site-packages/mock/backend.py", line 428, in build
    self._callHooks('prebuild')
  File "<peak.util.decorators.rewrap wrapping mock.backend._callHooks at 0x01E336E0>", line 3, in _callHooks
  File "/usr/lib/python2.6/site-packages/mock/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.6/site-packages/mock/backend.py", line 519, in _callHooks
    hook()
  File "<peak.util.decorators.rewrap wrapping ccache._ccacheBuildHook at 0x01E468C0>", line 3, in _ccacheBuildHook
  File "/usr/lib/python2.6/site-packages/mock/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.6/site-packages/mock/plugins/ccache.py", line 42, in _ccacheBuildHook
    self.rootObj.doChroot(["ccache", "-M", str(self.ccache_opts['max_cache_size'])], shell=False)
  File "/usr/lib/python2.6/site-packages/mock/backend.py", line 326, in doChroot
    shell=shell, *args, **kargs )
  File "<peak.util.decorators.rewrap wrapping mock.util.do at 0x01E28C80>", line 3, in do
  File "/usr/lib/python2.6/site-packages/mock/trace_decorator.py", line 70, in trace
    result = func(*args, **kw)
  File "/usr/lib/python2.6/site-packages/mock/util.py", line 288, in do
    preexec_fn = preexec,
  File "/usr/lib64/python2.6/subprocess.py", line 595, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.6/subprocess.py", line 1106, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied


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

How reproducible:
always

Additional info:
$ rpm -V mock
$ groups 
chris wheel mock
$ ls -la /var/lib/mock/ /var/cache/mock/
/var/cache/mock/:
insgesamt 12
drwxrwsr-x.  3 root mock 4096 22. Jun 15:34 .
drwxr-xr-x. 17 root root 4096 14. Jun 05:15 ..
drwxr-sr-x.  5 root mock 4096 22. Jun 15:34 fedora-rawhide-x86_64

/var/lib/mock/:
insgesamt 12
drwxrwsr-x.  3 root mock 4096 22. Jun 16:03 .
drwxr-xr-x. 46 root root 4096 14. Jun 07:05 ..
drwxrwsr-x.  4 root mock 4096 22. Jun 16:03 fedora-rawhide-x86_64


Even if I remove my user from the mock group and enter the root pw in userhelper, I get permission denied:

$ mock ../../../rpmbuild/SRPMS/xfce4-notes-plugin-1.7.0-1.fc11.src.rpm

(mock:15240): Gdk-CRITICAL **: gdk_x11_atom_to_xatom_for_display: assertion `atom != GDK_NONE' failed

(mock:15240): Gdk-CRITICAL **: gdk_x11_atom_to_xatom_for_display: assertion `atom != GDK_NONE' failed
INFO: mock.py version 0.9.16 starting...
State Changed: init plugins
State Changed: start
INFO: Start(../../../rpmbuild/SRPMS/xfce4-notes-plugin-1.7.0-1.fc11.src.rpm)  Config(fedora-rawhide-x86_64)
State Changed: lock buildroot
State Changed: clean
State Changed: init
ERROR: Could not create dir /var/lib/mock/fedora-rawhide-x86_64/result. Error: [Errno 13] Permission denied: '/var/lib/mock/fedora-rawhide-x86_64/result'
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/mock/util.py", line 61, 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/fedora-rawhide-x86_64/result'
ERROR: Exception(../../../rpmbuild/SRPMS/xfce4-notes-plugin-1.7.0-1.fc11.src.rpm) Config(fedora-rawhide-x86_64) 0 minutes 5 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-rawhide-x86_64/result
ERROR: Could not create dir /var/lib/mock/fedora-rawhide-x86_64/result. Error: [Errno 13] Permission denied: '/var/lib/mock/fedora-rawhide-x86_64/result'


Why has root no permission to create /var/lib/mock/fedora-rawhide-x86_64/result?
$ ls -la /var/lib/mock/fedora-rawhide-x86_64/
insgesamt 12
drwxrwsr-x. 3 root mock 4096 22. Jun 16:40 .
drwxrwsr-x. 3 root mock 4096 22. Jun 16:40 ..
drwxrwsr-x. 2 root mock 4096 22. Jun 16:40 root
Comment 1 Christoph Wickert 2009-07-01 04:26:22 EDT
Any idea what's going wrong here? It really is no PICNIC problem, I wish I showed it to you at FUDCon.
Comment 2 Clark Williams 2009-07-01 10:59:58 EDT
Christoph,

The first traceback looks like ccache is failing to run. Can you check to make sure that all is well with ccache?

The second traceback (root permission) has me puzzled. Is /var/lib/mock an NFS mount?
Comment 3 Christoph Wickert 2009-07-14 12:56:43 EDT
Sorry for the delay.

(In reply to comment #2)
> Christoph,
> 
> The first traceback looks like ccache is failing to run. Can you check to make
> sure that all is well with ccache?

What exactly you want me to check?

> The second traceback (root permission) has me puzzled. Is /var/lib/mock an NFS
> mount?  

Nope, local hdd.
Comment 4 Christoph Wickert 2009-09-18 06:08:24 EDT
I can't reproduce this any longer. Closing.

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