# [SOLVED]Apache permissions?

## Kas_

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

----------

## NeddySeagoon

Kas_

I get 

```
 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

----------

## Kas_

Hey Neddy,

I have drwxr-xr-x for www which now allows users to cd into it.  :Smile: 

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.

----------

## NeddySeagoon

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

----------

## Kas_

Neddy,

It works. Thanks.

----------

