LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 10-20-2008, 05:34 AM   #1
alanp23
LQ Newbie
 
Registered: Oct 2008
Posts: 2

Rep: Reputation: 0
Apache server Docroot file permissions


Hi!

I have an issue with file permissions, hopefully someone here will be able to help me.

Apache runs as apache:apache

user: alanp, groups: alanp
user: apache, groups: apache


I want to be able to rwx (read, write, execute) files in my docroot (/var/www) with my normal user account 'alanp'. The Apache server itself should normally only be allowed to r-x (read & execute) these files.

First, I issued a 'chown -R alanp:apache /var/www'. I am now the owner of the files and directories, and apache is the group.

I then issued a 'chmod -R 750 /var/www'. The permissions on the files are now -rwxr-x---. This means 'alanp' has +rwx and the apache group has +rx permissions.

This works great. My next problem arises however because I have a directory that allows the apache group write access for a php script that creates some flat-file logs. The permissions for this 'logs' directory are drwxrwx---. Apache is running as apache:apache, so that's how it's files get created, which means my normal user 'alanp' cannot access these files.

The only solution I can think of is to run apache as alanp:apache. Is this a suitable solution or is there anything better I could do?

Thanks

Alan
 
Old 10-20-2008, 05:40 AM   #2
alanp23
LQ Newbie
 
Registered: Oct 2008
Posts: 2

Original Poster
Rep: Reputation: 0
I've just been informed that suPHP may be a solution. I'm looking in to it now but it seems like a bit of a botch fix.
 
Old 10-20-2008, 06:58 AM   #3
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Hi.

You could add alanp to the apache group. Or you could create an 'apachewrite' group that has write access to whatever files, and add the apache and alanp users to that.

Dave
 
  


Reply

Tags
apache, permissions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache file permissions problem. {Apache/2.2.6 Fedora 8} hacker supreme Linux - Server 5 01-31-2008 04:26 PM
VHost tries to use apache docroot images, should not belorion Linux - Server 1 02-03-2007 05:05 PM
Apache 1.3.34 Server on Kubuntu - index.html file permissions? lefty.crupps Linux - Networking 0 09-07-2006 10:59 AM
Apache 2.0.54 DocRoot strange behaviour with VirtualHost dimsh Linux - Newbie 2 12-24-2005 04:31 AM
Fresh Load FC3 Apache err - Docroot must be directory trekk Linux - Networking 18 11-30-2004 05:48 PM


All times are GMT -5. The time now is 07:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration