Uploading a new collection to Ansible Automation Hub failed with error [Permission denied: b'/var/lib/pulp/.ansible/tmp']
Environment
- Ansible Automation Hub 4.5,4.6.
Issue
- Uploading a collection to Ansible Automation Hub failed with error :
ERROR: Invalid settings supplied for DEFAULT_LOCAL_TMP: Unable to create local directories(/var/lib/pulp/.ansible/tmp): [Errno 13] Permission denied: b'/var/lib/pulp/.ansible/tmp'
Resolution
- Change the ownership of directory .ansible to pulp:
# cd /var/lib/pulp
# chown pulp .ansible/ -R
Root Cause
- Wrong ownership of DEFAULT_LOCAL_TMP directory:
# ls -al /var/lib/pulp/
total 44
drwxr-xr-x 9 pulp pulp 4096 Jul 29 20:00 .
drwxr-xr-x. 45 root root 4096 Oct 4 02:10 ..
-rw------- 1 pulp pulp 40 Jul 29 20:00 admin_token
drwx------ 3 1001 pulp 4096 Apr 20 13:28 .ansible
drwxr-xr-x 6 pulp pulp 4096 Jul 29 19:58 assets
drwxrwxr-x 5 pulp pulp 4096 Jul 30 00:51 media
drwxr-xr-x 3 pulp pulp 4096 Jul 29 19:56 pulpcore_static
drwxrwxr-x 2 pulp pulp 4096 Jul 29 19:55 scripts
drwxrwxr-x 8 pulp pulp 4096 Oct 7 03:23 tmp
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.
Comments