Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 want to button down write access on a particular file using the Allow form directive in my httpd.conf file.

I have a PHP script that I want to be the only resource that can write to this file.

Is there a variation of the Allow from that I can define to make this happen?

share|improve this question
Still interested in knowing if there are useful alternatives on the Allow from other than IP addresses. Thanks. – H. Ferrence Mar 9 '10 at 21:48

Why not to put this file outside of DocumentRoot and give it proper privileges. If file is outside DocumentRoot, it can be still accessed through php script.

Of course you could use <Files> resoruce in Apache config, but for me it is not a proper solution, because file can be still undirectly accessed.

It should look like this:

<Files filename.ext>
    Order allow,deny

Check the table in order directive.

share|improve this answer success...decided on another route (see…) – H. Ferrence Mar 9 '10 at 21:46

Your Answer


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.