Skip to content

Instantly share code, notes, and snippets.

@dgoguerra
Last active August 29, 2015 14:00
Show Gist options
  • Save dgoguerra/11019348 to your computer and use it in GitHub Desktop.
Save dgoguerra/11019348 to your computer and use it in GitHub Desktop.
/var/www proper permissions

Add your user to www-data group.

sudo adduser USERNAME www-data

Then, change recursively the ownership of /var/www to your username.

sudo chown USERNAME:www-data -R /var/www

At last, change permissions to 755 and add g+s to directories to ensure all new files created have the same group as the directory's.

sudo chmod 0755 -R /var/www
sudo chmod g+s -R /var/www
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment