Skip to content

Instantly share code, notes, and snippets.

@jvmonjo
Last active March 22, 2017 18:51
Show Gist options
  • Save jvmonjo/2d275136a50b9a36188642d3208fe77e to your computer and use it in GitHub Desktop.
Save jvmonjo/2d275136a50b9a36188642d3208fe77e to your computer and use it in GitHub Desktop.

##Readme

Add yourself to the www-data group and set the setgid bit on the /var/www directory such that all newly created files inherit this group as well.

sudo gpasswd -a "$USER" www-data Correct previously created files (assuming you to be the only user of /var/www):

sudo chown -R "$USER":www-data /var/www find /var/www -type f -exec chmod 0660 {} ; sudo find /var/www -type d -exec chmod 2770 {} ;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment