Link to home
Start Free TrialLog in
Avatar of mafiq
mafiq

asked on

user running webser as

How do I make sure that the user that my Web server is running as is able to write
to:

        /usr/local/roads/logs
        /usr/local/roads/guts
        /usr/local/roads/source
with apache on linux
Avatar of samri
samri
Flag of Malaysia image

mafiq,

make sure the userid the webserver is running (apache on linux, or nobody on other platform, or check the config file for User and Group directive), and make sure the respective user/group has write permision to these directories.

Another approach is to have apache to run with the same userid/group to those that has write access to the directories mentioned.

Another is to chmod 777 to the directories(haha... this is a BIG way too BIG security hole), but it should work.

Another approach is to look at SuExec feature.  Take a look at Apache docs site on some SuExec documentations.  It's pretty stratighforward, and quite extensive.

http://httpd.apache.org/docs/suexec.html

cheers.
Avatar of mafiq
mafiq

ASKER

I have tried to check in the httpd.conf file but could not figure out what changes to make

Help pliz
Mafiq,

check the permission on those directories you wish the webserver could write to

In /usr/local/roads directory, do a "ls -l", and post the detail lines for these directories;

       /usr/local/roads/logs
       /usr/local/roads/guts
       /usr/local/roads/source

And in you httpd.conf (apache config file), look for the line that says "User" and "Group" keyword.  By default it should be "User apache", and "Group apache" with no quote (").

Btw;  What exactly you desired when you mentioned "is able to write".  Do you mean, get the CGI to write to some file?  Or in a bigger picture, what do you want to do?  Maybe we could assist with direct solution, or alternate solution could be offerred.

Cheers.
Avatar of mafiq

ASKER

CGI programs shld write to files in the directories I supplied.
ASKER CERTIFIED SOLUTION
Avatar of samri
samri
Flag of Malaysia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of periwinkle
No comment has been added lately, so it's time to clean up this TA.

I will leave a recommendation in the Cleanup topic area with the following recommendation for this question:

Answered by Samri

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

periwinkle
EE Cleanup Volunteer