I just installed LAMP server, which works fine. But when I code a PHP script and try to save it in /var/www/html
, it says:
You don't have permisission necessary to save the file
Help me! How do I fix this problem?
I just installed LAMP server, which works fine. But when I code a PHP script and try to save it in /var/www/html
, it says:
You don't have permisission necessary to save the file
Help me! How do I fix this problem?
Add your user to the www-data group
sudo usermod -a -G www-data username
Change the owner of /var/www
sudo chown -R username:www-data /var/www
Change the permissions recursively on /var/www
sudo chmod -R 644 /var/www
NB: Replace username in the commands with your username.
/var/www
(and no I didn't switch because I had issues. :) )
– anonymous2
Jun 22 '16 at 14:02
/var/www
, but it's true that a 644 would be sufficient for the average user.
– anonymous2
Jun 22 '16 at 15:07