Server Fault is a question and answer site for system and network administrators. 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 need to call a php script via cron. The cron entry will use wget. When I attempt to call the script from a command line, I get "Authorization Required", which is obviously coming from my htaccess file.

Does anyone know how I can override the htaccess file for a single directory?

share|improve this question
up vote 1 down vote accepted

You can use the Satisfy directive inside a Directory container or in your .htaccess file to override the authentication requirement.

If your PHP script doesn't need the environment of a full web server, it would be far easier, more secure and would produce less overhead to just execute the script with the PHP command-line interpreter.

share|improve this answer
Joschi, thanks for the help and the point in the right direction. Because of the framework of the site, the path to the script isn't really an option. I'd agree with you about the security though. I'll see what I can learn from the links you gave. – user55999 Oct 3 '10 at 7:07
You're a life saver, Joschi. It worked. Thanks a bunch! – user55999 Oct 3 '10 at 7:10

Your Answer


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