View previous topic :: View next topic |
Author |
Message |
Kas_ Tux's lil' helper
Joined: 05 Oct 2012 Posts: 124
|
Posted: Sun Oct 21, 2012 6:18 pm Post subject: [SOLVED]Apache permissions? |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54234 Location: 56N 3W
|
Posted: Sun Oct 21, 2012 6:46 pm Post subject: |
|
|
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 |
|
|
Kas_ Tux's lil' helper
Joined: 05 Oct 2012 Posts: 124
|
Posted: Sun Oct 21, 2012 7:19 pm Post subject: |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54234 Location: 56N 3W
|
Posted: Sun Oct 21, 2012 10:00 pm Post subject: |
|
|
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 |
|
|
Kas_ Tux's lil' helper
Joined: 05 Oct 2012 Posts: 124
|
Posted: Sun Oct 21, 2012 10:34 pm Post subject: |
|
|
Neddy,
It works. Thanks. |
|
Back to top |
|
|
|