Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache script permissions

Status
Not open for further replies.

spaddict

Programmer
Sep 29, 2002
1
US
Hi,

I'm a little confused on how I would allow a script to write .jpg thumbnails (dynamically created) to disk for display. I already have the script to do this - I just need to figure out what permissions to set Apache to allow this. I think I've figured out I need to use <Directory &quot;D:/webroot/thumb/&quot;>(stuff goes here)</Directory>, but I'm not sure what is supposed to go inside the directory directive. Either that or I'm supposed to use .htaccess files.

Anyway, if you know what to do, a response would be appreciated :)

Adam
 
Unlike a *nix system, Win systems do not set permissions to read, write and execute on the directories and files. As you sugggest, it is all done through httpd.conf. Most of the time, scripts are put in the cgi-bin or a sub-directory under cgi-bin. The ScriptAlias directive tells apache to not only pretend this directory is in the DocumentRoot but that everything in there is a script. If you must use scripts outside of the cgi-bin, then you need to tell apache which file types to parse as scripts. This is done with the AddHandler directive like this:

AddHandler cgi-script .cgi .pl

In the directory that you want to be able to ececute scripts, you must also add the ExecCGI directive to the directory container. Other than being able to execute the script, I don't think you need permission to write to the directory unless someone specifically set the attributes for it to read only.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top