cobbler sync fails with error "[Errno 13] Permissio n denied: '/var/lib/tftpboot/aarch64/<file>' ".
Environment
- Red Hat Satellite v 5.7
- Red Hat Enterprise Linux v.6/v.7
- cobbler
Issue
- Cobbler sync fails with error,
[DefaultQuartzScheduler_Worker-2] ERROR com.redhat.rhn.taskomatic.task.CobblerSyncTask - Runtim
eExceptionError trying to sync to cobbler: redstone.xmlrpc.XmlRpcFault: <type 'exceptions.IOError'>:[Errno 13] Permissio
n denied: '/var/lib/tftpboot/aarch64/grub.cfg'
- OR fails with,
copying: /var/lib/cobbler/loaders/bootaa64.efi -> /var/lib/tftpboot/.link_cache/0b9088ebb3f32aa9a248eb8770107dfcb233b564
copying: /var/lib/cobbler/loaders/bootaa64.efi -> /var/lib/tftpboot/aarch64/bootaa64.efi
Exception occured: <type 'exceptions.OSError'>
Exception value: [Errno 13] Permission denied: '/var/lib/tftpboot/aarch64/bootaa64.efi'
Exception Info:
File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 95, in run
rc = self._run(self)
Resolution
-
This is a known bug for package
selinux-policyforRed Hat Enterprise Linux v.6/v.7, refer the public bugzilla links mentioned below for more information,
Bug 1213540 - RHEL7
Bug 1213539 - RHEL6 -
A "permanent workaround" for this issue is to add the selinux context definitions for the new directories by hand using semanage (provided by the policycoreutils-python rpm),
# semanage fcontext -a -t cobbler_var_lib_t "/var/lib/tftpboot/aarch64(/.*)?"
# semanage fcontext -a -t cobbler_var_lib_t "/var/lib/tftpboot/images2(/.*)?"
# restorecon -R -v /var/lib/tftpboot/
- Once done execute,
# cobbler sync
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
