Created
May 21, 2016 13:45
-
-
Save phamngsinh/6353a274b394c7bc0fb27c1c4a4e226e to your computer and use it in GitHub Desktop.
Correct permissions for /var/www
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment