Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]Apache permissions?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Kas_
Tux's lil' helper
Tux's lil' helper


Joined: 05 Oct 2012
Posts: 124

PostPosted: Sun Oct 21, 2012 6:18 pm    Post subject: [SOLVED]Apache permissions? Reply with quote

So I want to edit the webpages as user but /var/www/htdocs only allows root to use them. Do I chmod 777 them so that user can use it? I tried adding user to group apache and having group apache own www but that didn't seem to work. the permissions was 774 on www and group should have been allowed to access it but I got permission denied.

Last edited by Kas_ on Sun Oct 21, 2012 10:34 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32091
Location: 56N 3W

PostPosted: Sun Oct 21, 2012 6:46 pm    Post subject: Reply with quote

Kas_

I get
Code:
 drwxr-xr-x  3 apache root 4096 Sep  8 21:58 www
from /var $ ls -l

So www is owned by user apache and belongs to the root group.

Further down the tree, the permissions are 644 root and root.

You will need to very carefully recursivly change the group to apache and the permissions to 664 and add yourself to the apache group.
Normal users only need read access, so xx4 should be fine.

The group will need +x on all the directories in the path or cd will not work
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Kas_
Tux's lil' helper
Tux's lil' helper


Joined: 05 Oct 2012
Posts: 124

PostPosted: Sun Oct 21, 2012 7:19 pm    Post subject: Reply with quote

Hey Neddy,

I have drwxr-xr-x for www which now allows users to cd into it. :)
I have 664 (drw-rw-r--)for localhost but usr cannot cd into localhost. It's owned by apache and root.

I have tried 774 but that does not work either.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32091
Location: 56N 3W

PostPosted: Sun Oct 21, 2012 10:00 pm    Post subject: Reply with quote

Kas_,

Its the x bit on a dir that allows cd to it.
Quote:
I have 664 (drw-rw-r--)for localhost but usr cannot cd into localhost

That needs to be 775 or drwxrwxr-x
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Kas_
Tux's lil' helper
Tux's lil' helper


Joined: 05 Oct 2012
Posts: 124

PostPosted: Sun Oct 21, 2012 10:34 pm    Post subject: Reply with quote

Neddy,
It works. Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum