Help setting up a cronjob


I’m trying to set up a cronjob on our webserver. We have an FTP user and a shell user, and i made the cronjob on the shell user, obviously. The idea is that once every 24-hours, the cronjob deletes all files in a specific folder. I’ve set up the cronjob through the DreamHost panel to run every ten minutes (For testing purposes), the command itself looks like this:

But for some reason the files are never deleted. If i log in through SSH and run the exact same command from the shell, i’m told i don’t have the needed permissions to delete said files. What do i do?


change the permissions?


The command needs to specify the full path to the files you need to delete – starting with “…” doesn’t work, since the cron job doesn’t run from your domain directory (or wherever else you’re assuming it runs from).


And the other thing is that the shell user won’t be able delete files in the directory of another user unless you modify the permissions on the directory containing the files (and have extra security turned off).