# /usr/local/www permissions



## jtran (Jan 21, 2011)

For some odd reason, the permissions on /usr/local/www keep reverting back to root:wheel although I changed the owner to www:www many times

Any idea as to why this is happening? If this has been answered before, please point me in the right direction


----------



## Alt (Jan 21, 2011)

This is God saving your www folder from bugged php scripts, cus they exec from www user.


----------



## dandelion (Jan 21, 2011)

/usr/local/www is part of /usr/ports/Templates/BSD.local.dist. That mtree(8) template is used to populate PREFIX (i.e. /usr/local) on *every* port/package install.


----------



## jtran (Jan 22, 2011)

Thanks for pointing me in the right, dandelion

I ended up editing /usr/ports/Templates/BSD.local.dist and adding the following before www

```
/set uname=www gname=www
```

Then, I ran [cmd=]sudo mtree -U -f /usr/ports/Templates/BSD.local.dist -p /usr/local/[/cmd] to apply the changes instead of waiting for the next time I compile and install a port.

Many thanks


----------

