Solved

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

Posted on 2006-07-11
5
208 Views
Last Modified: 2010-04-22
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!
0
Comment
Question by:speednow
  • 2
  • 2
5 Comments
 
LVL 39

Expert Comment

by:noci
ID: 17085860
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
 

Author Comment

by:speednow
ID: 17087072
chown: `apache': invalid user
0
 

Author Comment

by:speednow
ID: 17087752
Follow Up??
0
 
LVL 16

Expert Comment

by:Blaz
ID: 17088004
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
 
LVL 39

Accepted Solution

by:
noci earned 500 total points
ID: 17088170
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

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Linux daemon 11 348
Question on netstat and Logmein 10 127
MySQL User Query Auditing 1 73
linux juniper redhat why use for firewalls 8 83
​Being a Managed Services Provider (MSP) has presented you  with challenges in the past— and by meeting those challenges you’ve reaped the rewards of success.  In 2014, challenges and rewards remain; but as the Internet and business environment evol…
Hello EE, Today we will learn how to send all your network traffic through Tor which is useful to get around censorship and being tracked all together to a certain degree. This article assumes you will be using Linux, have a minimal knowledge of …
This video discusses moving either the default database or any database to a new volume.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now