Solved

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

Posted on 2006-07-11
5
212 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 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
best security practices on linux 3 306
IPA password reset issue 6 467
IPTables UDP rule 3 55
WEBSITE Capture via Linux Router 2 94
BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
Fine Tune your automatic Updates for Ubuntu / Debian
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

773 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