Description of problem: ERROR: Could not create dir /var/lib/mock/fedora-21-x86_64/root/builddir/build/RPMS. Error: [Errno 13] Permission denied: '/var/lib/mock/fedora-21-x86_64/root/builddir/build' Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/mockbuild/util.py", line 99, in mkdirIfAbsent os.makedirs(dirName) File "/usr/lib64/python2.6/os.py", line 150, in makedirs makedirs(head, mode) File "/usr/lib64/python2.6/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 13] Permission denied: '/var/lib/mock/fedora-21-x86_64/root/builddir/build' ERROR: Could not create dir /var/lib/mock/fedora-21-x86_64/root/builddir/build/RPMS. Error: [Errno 13] Permission denied: '/var/lib/mock/fedora-21-x86_64/root/builddir/build' Version-Release number of selected component (if applicable): 1.2.10 How reproducible: always Steps to Reproduce: 1.mock --init -r fedora-21-x86_64 2.gives error 3. Actual results: Fails to create directories Expected results: Additional info: user is in mock group drwxrwsr-x 12 root mock 4096 Jun 24 03:01 /var/lib/mock
Build system was correctly working before update to 1.2.10 update applied to build f22
*** Bug 1235141 has been marked as a duplicate of this bug. ***
Commenting out line 388 buildroot.py where it drops privileges fixes the problem as it needs privilegs to create directories when the builddir is drwx------ 3 root mock 4096 Jun 24 20:16 /var/lib/mock/fedora-22-x86_64/root/builddir/
I am really curious how you created the directory as: drwx------ 3 root mock It should be: drwx--S--- 3 root mock An no matter how I am trying I could not get that directory without S attribute. Can you please provide more data so I can reproduce? Feel free to reopen once you have reproducer.
Sorry for the delay - its on a centos VM on Centos 6.7. The directory was created by mock on first build session.
I just deleted the whole directory structure and it came back with directory as before with no S. Just upgraded to mock-1.2.12-1.el6.noarch and still same problem
mock-1.2.13-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16053
mock-1.2.13-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16054
mock-1.2.13-2.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16056
mock-1.2.13-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-8114
mock-1.2.13-2.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-8115
mock-1.2.13-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16054
mock-1.2.13-2.fc21 has been pushed to the Fedora 21 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16056
Unfortunately I'm using epel and its not in epel or epel-testing yet
mock-1.2.13-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16053
mock-1.2.13-2.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-8115
mock-1.2.13-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update mock'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-8114
mock-1.2.13-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.13-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.13-2.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.13-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.13-2.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.
Finish: yum install ERROR: Could not create dir /var/lib/mock/sc-atrpms-7-x86_64/root/builddir/build/RPMS. Error: [Errno 13] Permission denied: '/var/lib/mock/sc-atrpms-7-x86_64/root/builddir/build' Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/mockbuild/util.py", line 100, in mkdirIfAbsent os.makedirs(dirName) File "/usr/lib64/python2.6/os.py", line 150, in makedirs makedirs(head, mode) File "/usr/lib64/python2.6/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 13] Permission denied: '/var/lib/mock/sc-atrpms-7-x86_64/root/builddir/build' ERROR: Exception(/var/ftp/pub/home/SRPMS/mythtv-0.27.5-9.src.rpm) Config(sc-atrpms-7-x86_64) 8 minutes 18 seconds INFO: Results and/or logs in: /var/lib/mock//sc-atrpms-7-x86_64/result ERROR: Could not create dir /var/lib/mock/sc-atrpms-7-x86_64/root/builddir/build/RPMS. Error: [Errno 13] Permission denied: '/var/lib/mock/sc-atrpms-7-x86_64/root/builddir/build' This is with mock-1.2.13-2.el6.noarch