Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a directory my_website/public, which I did chmod 777 on. I set up a cronjob to delete all the files in my_website/public/photos/* But I got an email notification saying that rm does not have permission to remove the files in there. Why is that?

share|improve this question
up vote 1 down vote accepted

Which unix are you using? There has been a similar question for ubuntu:

http://askubuntu.com/questions/23009/reasons-why-crontab-does-not-work

If I were you I would do the setup procedure again making sure that all command are done recursively i.e. chmod -r and rm -r since you might have chmodded the directory but not the files therein and not a subdirectory. If you're using ubuntu you might want to look into more specific resources how its cron is working.

share|improve this answer
    
Thanks for your response. The files in my photos directory are new every day. If I chmod -r today, will it also affect files coming into the directory tomorrow? – Paul S. Jun 15 '13 at 5:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .