cancel
Showing results for 
Search instead for 
Did you mean: 

NEW CGI .htaccess

N/A

NEW CGI .htaccess

I wanted to limit access to my cgi space to my own IP while I setup the scripts.

So I made a .htaccess file with

Order Deny,Allow
Deny from All
Allow from <my ip>

This all seemed fine. Until I removed the Allow from <my ip> and put the .htaccess file in a directory that I want to contain log files saved by my scripts and include files which should be hidden from the outsite world.

The .htaccess had no effect at all.

How can I protect certain directories if this does not work?
2 REPLIES
N/A

NEW CGI .htaccess

if its just your scripts that access the logs then you could chmod the directory to 700. Your scripts run under your own username so it will have full access (7) as normal, but the normal webserver runs under a different user name belonging to the group and so will have no access (0).

I have done this for protecting images and logs in a directory that can now only be accessed by a php feeder file.

Hope that helps.

Jarv
N/A

NEW CGI .htaccess

That is excellent. Sounds like exactly what I need to know.

Many thanks.