Hello Team
I’m create simpe DAG to create new directory with bash operator. i have running in docker.
but an error “Permission denied”
from airflow import DAG
from airflow.operators.bash import BashOperator
from airflow.operators.dummy import DummyOperator
from datetime import datetime, timedelta
dag = DAG(
dag_id=“test_create_directory”,
tags=[“test_create_directory”],
schedule_interval=“@daily”,
start_date=datetime(2023, 1, 1),
end_date=datetime(2023, 1, 5),
)
task_mkdir = BashOperator(
task_id=“create_directory”,
bash_command=“/usr/local/airflow/dags/bash_operator/scripts/create_dir.sh”,
dag=dag
)
start_task = DummyOperator(task_id=“start_task”, dag=dag)
end_task = DummyOperator(task_id=“end_task”, dag=dag)
start_task >> task_mkdir >> end_task
and this is bash script
#!/bin/bash
cd /usr/local/airflow/
mkdir test_create_dir
please help me.