1

I have a cron setup using sudo crontab -e on my EC2 (Ubuntu) which runs a bashfile to execute my python program. The python program creates a log file. Now due to some error if my program closes and I run it from terminal it gives me error for access denied.

1
  • if you run crontab with sudo, the process will run as root user and the ownership of the file will belong to that user. Can your bash script have a chown/chmod command changing the ownership/permission of the log file? Commented Feb 9, 2024 at 8:55

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.