[SLUG] Writing to /var/www/html

Stephen O'Neill soneill84 at yahoo.co.uk
Sun Jun 3 10:59:58 BST 2007


Mike Bennett wrote:
> I do exactly the same as you do mate except I only change the group of 
> the files and not the owner.
> I've been looking for a bet way round it for ages but not found it.

I have found that this:

sudo chown -R www-data.www-data /var/www/html
sudo chmod -R 6774 /var/www/html

having the "6" part sets the "sticky" bit on folders such that files 
created within them are owned by the creator but the group owner is 
whoever owns their parent folder. I have not researched enough to 
understand this yet - I just copied and pasted and it did something... 
*blush*.

This is a step in the right direction. I am now looking to see how I set 
www-data's umask to 002 rather than 022 so that the group has full 
permissions by default.

I tried adding a conditional to /etc/profile but that didn't work. I 
have read that you can configure php with the umask so that it chmods (I 
think) so that may be my next avenue of investigation.

Steve O





More information about the Scarborough mailing list