Airflow run_as_user permission denied #29402
Replies: 3 comments 2 replies
-
This user doesn't have enough permissions to write in the logs folder, the best solution to avoid permissions problems is making Airflow group the owner of Airflow home and add all the new users to this group: # create airflow group if not exist
getent group airflow || groupadd airflow
# make it the group of the Airflow home and all the folders inside it
chgrp -R airflow /wwx/airflow
# add users to this group
usermod -a -G airflow <user name> |
Beta Was this translation helpful? Give feedback.
-
you should change the airflow conf |
Beta Was this translation helpful? Give feedback.
-
when running airflow-celery-worker I got the same problem. I handled it by removed option "-D" |
Beta Was this translation helpful? Give feedback.
-
I am running airflow
2.4.3
in a single machine, airflow is installed in a python virtualenv, the airflow_home is/wwx/airflow
.My DAG:
DAG description:
The dag is owned and run by a user
talend
, this user is created in both OS and airflow level. In OS level, the user has group airflow, sudo; in airflow level, the user is admin role.Inside the dag there is a PythonOperator task to save csv to a folder, it is expected that the csv file will be created and owned by the
talend
user.Problem description:
When I trigger this dag in web UI, it is showing the error permission denied for the dag log folder:
Then I have examined the problematic folder and found it is permission 700.
I could
chmod 777
to the folder manually, however, if there are other new dags/tasks, any new dag/task folder is automatically created with permission 700 and I have to manually chmod.What I have tried:
I have followed https://airflow.apache.org/docs/apache-airflow/1.10.10/security.html?highlight=impersonation#impersonation
Beta Was this translation helpful? Give feedback.
All reactions