Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-11-2015, 11:16 AM   #1
LQ Newbie
Registered: Feb 2015
Distribution: Centos
Posts: 1

Rep: Reputation: Disabled
Normal Linux user recursively write access to Apache Document root

I tried adding two users in apache group and given 775 permission to Document root but user is not able to write into files in DocumentRoot

Tried adding user and DocumentRoot Folder in sudo file but not able to do it recursively

please help

Thanks for reply,
I have already given chmod 775 -R DocumentRoot - for recursively writting permission
You have told to add user in www-data group and chmod 775 -R to DocumentRoot
usermod -a -G www-data <user1>

How can users in www-data can able to write in DocumentRoot which has apache:apache owner and group
please clarify...

Done below steps to solve this:
1) I have created a new group webdata and added required users in this group
2) set sticky bit to document root with below command
setfacl -m g:webdata:rwx -R /path/to/documentroot/
this command will set rwx permission to DocumentRoot so that members in webdata can have full access but still DocumentRoot user and group will be apache

Last edited by holymind; 02-19-2015 at 10:17 PM. Reason: Solved Thx for your support
Old 02-11-2015, 11:32 AM   #2
LQ 5k Club
Registered: Jan 2011
Location: Nowhere near you, thank God.
Distribution: OSX Sierra
Posts: 8,570
Blog Entries: 14

Rep: Reputation: Disabled
Welcome to LQ.
The first question is "why do these 2 users need write access to DocumentRoot?"
Uploading content?

Generally, I'd add them to www-data group using
usermod -a -G www-data <user1>
usermod -a -G www-data <user2>
and have them logout and back in.
Did you 775 recursively?
Writing in DocumentRoot and writing beneath it is another matter that will require
chmod 775 -R


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 2.2 - can not access virtual host document root bobnw Linux - Newbie 8 06-11-2009 06:16 PM
Access files outside the document root for Apache vwvr9 Linux - Server 3 07-28-2008 05:28 PM
Mounting a hard drive so that a normal user get write access raghesh Linux - General 4 08-24-2007 12:26 AM
Apache 403 access denied outside of document root freedo5 Linux - Software 2 09-21-2005 08:06 PM
Apache doesn't allow non-document-root access in default setup jenna_h Mandriva 1 10-28-2003 07:07 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:16 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration