LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Granting directory access to apache docroot (https://www.linuxquestions.org/questions/linux-security-4/granting-directory-access-to-apache-docroot-4175484379/)

sparcusa 11-12-2013 06:46 PM

Granting directory access to apache docroot
 
Newbie security question. I'm running CENTOS5. I have disabled password entry to enhance security and turned off remote root access. I setup a remote login user account with a private key called user1. I want to give user1 access to the apache docroot so he can upload files. The apache docroot directory is owned by the daemon group. I put user1 into that group and user1 can not write to that directory even though daemon has 755 access to the docroot directory.

Q1 How do I safely give user1 upload access to docroot?

unSpawn 11-13-2013 01:39 AM

Use ACLs ('man acl; man getfacl; man setfacl') and search LQ for "setfacl" or see an example at http://stackoverflow.com/questions/4...rmission-issue.

zhjim 11-13-2013 04:15 AM

Give write permission to group. chmod g+w or chmod 775.
Mind that after adding the user to the group you have relog to have it take effect.

sparcusa 11-13-2013 06:37 AM

Quote:

Originally Posted by zhjim (Post 5063604)
Give write permission to group. chmod g+w or chmod 775.
Mind that after adding the user to the group you have relog to have it take effect.

Is there any security significance to the 'daemon' user?

zhjim 11-13-2013 08:34 AM

Sems like it owns the apache daemon. Dunno if any other services are running with a member of this group. Get a listing of the group members and take a look.
You could also chown the group to the group of user1. Or use acl's like unspawn suggested.


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