Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.