I am trying to run the docker-compose file from the main airflow website and when I try to do docker-compose up airflow-init it fails and gives me:
airflow-init_1 | with open(AIRFLOW_CONFIG, 'w') as file:
airflow-init_1 | PermissionError: [Errno 13] Permission denied: '/opt/airflow/airflow.cfg'
Most of the services show this same error, such as the flower_1, airflow-webserver_1, airflow-worker_1 and airflow-scheduler_1. It reaches the maximum 20 retires and gives up.
I tried to do chmod -R 777 on the directory where the airflow.cfg lives but same error comes up. In the docker-compose.yml file I have:
volumes:
- ./airflow.cfg:/opt/airflow/airflow.cfg
I tried without mounting the airflow.cfg file but now I get this message:
ValueError: Unable to configure handler 'processor': [Errno 13] Permission denied: '/opt/airflow/logs/scheduler'
I checked the directory permissions and it looks like this: drwxrwxrwx.
I'm not sure what else to try. I'm running on RHEL VM. Appreciate some help. Thanks.