astronomer / airflow-quickstart

Get started with Apache Airflow. Check the README for instructions on how to run your first DAGs today. 🚀
46 stars 109 forks source link

duckdb.IOException: IO Error: Cannot open file "/usr/local/airflow/include/dwh": Permission denied #12

Open maxestorr opened 3 months ago

maxestorr commented 3 months ago

How to reproduce:

Follow "Option 2: Use the Astro CLI" instructions and run part 1, it'll result in the above issue.

Cause:

Astro CLI forces Airflow's docker container to set the astro user's UID to 50000.

Proposed Solution:

The only way I know how to get around this is to sudo chmod -R a=rwx project-folder to recursively allow any users to read write execute the folder Airflow needs access to.

Default Airflow Docker has an env variable that allows you to set the airflow UID to the same as your host's UID.

Yust0724 commented 3 months ago

It helps because I had the same problem. One question, is the command sudo chmod -R a=rwx project-folder run inside the webserver-1 Docker environment? When I run it it asks for the admin password and won't let me run it.

maxestorr commented 3 months ago

@Yust0724 I think you could run it on your host machine or in the docker container, I ran it from my host machine because I know what the sudo password is as I set it when I set up WSL2 and I didn’t know what the sudo password was for the docker container.

Yust0724 commented 2 months ago

@maxestorr Thank you. I was able to do it. Specifically, I entered the container as root in WSL2 and changed the permissions with chmod as follows:

docker exec -u root -it <container_id> /bin/bash