Skip to content

Instantly share code, notes, and snippets.

@mfurlend
Created January 28, 2014 16:14
Show Gist options
  • Save mfurlend/8670749 to your computer and use it in GitHub Desktop.
Save mfurlend/8670749 to your computer and use it in GitHub Desktop.
sudo usermod -a -G www-data <some_user>
Then set the correct permissions on /var/www.
sudo chgrp -R www-data /var/www
sudo chmod -R g+w /var/www
Additionally, you should make the directory and all directories below it "set GID", so that all new files and directories created under /var/www are owned by the www-data group.
sudo find /var/www -type d -exec chmod 2775 {} \;
Find all files in /var/www and add read and write permission for owner and group:
sudo find /var/www -type f -exec chmod ug+rw {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment