[PLUG] CGI Scripts

Bill Spears bspears at easystreet.com
Sun Apr 28 22:19:25 UTC 2002


On Saturday 27 April 2002 08:54 pm, you wrote:
> The permission on the cgi-bin directory should allow the apache user
> permission to execute the script.  The apache user is either nobody or
> apache depending on your distribution.  You can do this various ways, but
> two of them is either change the owner of the script to the apache user or
> change the group of the script to the group the apache user is in.  Make
> the directory r-xr-x--- apache apache . . .  
Good advice, everything still works.

As to working with the scipts
> you can su to the apache user and do your work, or change the owner, work,
> change it back for testing.
Maybe something I don't understand about su.  When I went from root to apace 
with su, it still identified me as root, not that it matters much

>
> As for writing to the disk you can manage that with permissions, too, if
> you remember who is executing the program.  Use the http.conf file to
> configure you directories.  
You mean something like this:
 <Directory /usr/local/apache/htdocs/somedir>
                Options +ExecCGI
        </Directory>

>You can use the .htaccess file, but if you are
> writing to a directory some wise guy will overwrite the file.  
Don't follow this.

I'll be composing tex files and converting them to pdf.  Should I do that in 
some directory owned by apache marked: rw-rw----?  It is true isn't it that 
dirctories outside the directory root tree will not be served up by apache.  

Suppose typical html files are in html, which is owned by apache and marked 
r-xr-x---, how can a script executing as apache write a pdf file there?




More information about the PLUG mailing list