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


  Search this Thread
Old 06-20-2007, 01:02 PM   #1
Registered: Oct 2006
Posts: 43

Rep: Reputation: 15
Apache write access


I am setting up a web server for our web site (it is currently hosted by a 3rd party and we will be hosting it our selves shortly).

The web developer told me that the code creates files and folders at various places in the site including the root of the web site (and it may update existing files too). The site is written in PHP.

The server I am setting up is running Apache 2.2 and PHP5.

I am very hesitant to give the apache user write access to the entire web site directory for obvious reasons.

My question is:
Is there some way we can allow PHP to create files/folders and update files without giving apache write access to everything?

I am thinking of something like suExec.

Any ideas would help.

Old 06-20-2007, 01:22 PM   #2
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Since you are working with a web developer, you should ask him which way will integrate better with the software. For example two things I do are make the static files that Apache serves owned by nobody.nobody with read permission for all (they are served on the web after all). I also use SELinux to provide a mandatory access control layer of protection.


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
grip : no write access to write encoded file bidouilleur Linux - Software 5 10-09-2010 09:23 PM
Grip- "no write access to write encoded file" Alvis Linux - Software 4 01-06-2004 04:18 PM
NFS: how can I get write-access?? pablovschby Linux - Networking 3 12-24-2003 08:39 AM
having a write access hhegab Linux - General 9 05-27-2003 01:09 PM
smartmedia write access wincen Linux - Hardware 1 11-19-2002 05:33 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:00 AM.

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