How to give access to apache to write to a file?

I have created a form that reads and writes settings from:

/etc/mail/spamassassin/local.cf

It reads the settings specified in my config.php file, but it wont let me change them.

I need ti give access to APACHE to write to that file.

How do i accomplish this by SSH?

This file must be writable by the web server!
speednowAsked:
Who is Participating?
 
nociConnect With a Mentor Software EngineerCommented:
In the httpd.conf (or config file that is supplied to the apache process) there is u "User xxx"
statement. Lookup that line and use the username mentioned there.
0
 
nociSoftware EngineerCommented:
Try "chown apache /etc/mail/spamassassin/local.cf" + 'chmod u+w ....'
Be sure the original reader belong to the group that can still read the file.

Be advised that everybody that can access your webserver can update that file.....
0
 
speednowAuthor Commented:
chown: `apache': invalid user
0
 
speednowAuthor Commented:
Follow Up??
0
 
BlazCommented:
Maybe you can try user nobody instead of apache. Or better yet - figure out under which user your apache servers runs.

"ps -elf | grep httpd"

The third column should give you the user.
0
All Courses

From novice to tech pro — start learning today.