Create file using bashoperator (curl command) in Astro environment

I’m trying to perform some instructions to write a file in a tmp folder. When I use the command in my mac it works, but this is not the case from the operator:

For instance:

fetch = BashOperator(
        bash_command="curl --request GET '' -o tmp/in.json --create-dirs")

and other actions like:

mkdir abc
>>> mkdir: cannot create directory ‘abc’: Permission denied

How do I solve it?

If I use the sudo command, it will prompt for a password that I wasn’t able to find.