• We did not send an email asking for donations - please read this post.

Cron task doesn't erase directory

banderas20

Member
Joined
Aug 1, 2018
Messages
33
Reaction score
13
Credits
186
Hi there.

I have a php script which creates a temp directory. Then makes other stuff and finally removes the temp directory.

If I run the script with user root directly in the CLI, everything works fine.
However, the cron task throws an error while trying to delete the temp directory. Crontab is owned by root, so the user launching the script should be the same.

¿Am I missing something here?

Thanks!

PS: using Gentoo
 


dos2unix

Well-Known Member
Joined
May 3, 2019
Messages
1,571
Reaction score
1,191
Credits
10,043
The person running the script doesn't determine what permssion's the script itself has.
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online


Top