Ansible Automation Platform installer fails with "PermissionError: [Errno 13] Permission denied"

Solution Verified - Updated -

Environment

  • Red Hat® Ansible Automation Platform 2.x

Issue

  • While performing the Ansible Automation Platform upgrade installer fails with error "PermissionError: [Errno 13] Permission denied"

Resolution

  • The error occurs because of incorrect permissions of file /var/log/tower/tower_rbac_migrations.log

  • Check and correct the permissions of /var/log/tower/tower_rbac_migrations.log file. The default permission should be as follows:

    # ls -l /var/log/tower/tower_rbac_migrations.log
    -rw-r-----. 1 awx awx 0 Oct 17 16:06 /var/log/tower/tower_rbac_migrations.log 
    

Diagnostic Steps

  • The following error log can be observed in the verbose log of latest generated setup file:

    Traceback (most recent call last):
    File \"/usr/bin/awx-manage\", line 11, in <module>
    load_entry_point('awx==3.8.3', 'console_scripts', 'awx-manage')()
    File \"/var/lib/awx/venv/awx/lib64/python3.6/site-packages/awx/__init__.py\", line 154, in manage
    execute_from_command_line(sys.argv)
    File \"/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/core/management/__init__.py\", line 381, in execute_from_command_line
    utility.execute()
    File \"/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/core/management/__init__.py\", line 357, in execute
    django.setup()
    File \"/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/__init__.py\", line 19, in setup
    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
    File \"/var/lib/awx/venv/awx/lib64/python3.6/site-packages/django/utils/log.py\", line 76, in configure_logging
    logging_config_func(logging_settings)
    File \"/usr/lib64/python3.6/logging/config.py\", line 802, in dictConfig
    dictConfigClass(config).configure()
    File \"/usr/lib64/python3.6/logging/config.py\", line 573, in configure
    '%r: %s' % (name, e))
    ValueError: Unable to configure handler 'rbac_migrations': [Errno 13] Permission denied: '/var/log/tower/tower_rbac_migrations.log'
    

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