Training

When: Every first Sunday of every month -get a ticket- from $15 (Click Here).

Friday, November 10, 2017

wordpress | rights | apache2 - Correct permissions for /var/www and wordpress - Ask Ubuntu

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
or   
sudo chown $USER:www-data -R /var/www/html/yourdirectory




Next step, for general practice, 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


or

sudo chmod u=rwX,g=srX,o=rX -R /var/www/html/yourdirectory




Related to specific permission for wordpress or laravel or another framework, then you can read the documentation respectively.





Hope it helps...






apache2 - Correct permissions for /var/www and wordpress - Ask Ubuntu



or:



https://codex.wordpress.org/Changing_File_Permissions

No comments: