Skip to content

Instantly share code, notes, and snippets.

@hitswa
Created April 3, 2017 08:32
Show Gist options
  • Save hitswa/d321654b184f1b9cb58d2e4d93bb87ac to your computer and use it in GitHub Desktop.
Save hitswa/d321654b184f1b9cb58d2e4d93bb87ac to your computer and use it in GitHub Desktop.
getting full access to var/www/html folder
// Source: http://askubuntu.com/questions/162866/correct-permissions-for-var-www-and-wordpress
// First, you should ensure that your username is included in www-data group. If not, you can add your username as www-data group
sudo adduser $USER www-data
// After that, you should change the ownership of /var/www to your username
sudo chown $USER:www-data -R /var/www
// Next step, you should change permission to 755 (rwxr-xr-x), not recommend changing permission to 777 for security reason
sudo chmod u=rwX,g=srX,o=rX -R /var/www
//third step didn't worked for executed for me but still its working so i think you may leave it optionally
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment