Solved

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

Posted on 2006-07-11
5
218 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 40

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 40

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

Monthly Recap

May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

​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 …
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

717 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