Tuesday, May 7, 2024
 Popular · Latest · Hot · Upcoming
9
rated 0 times [  9] [ 0]  / answers: 1 / hits: 11733  / 1 Year ago, thu, november 24, 2022, 6:43:02

Please don't mark it as duplicated. I've tried a lot but can't make it working.



I've installed LAMP using tasksel.
Everything is fine but having file permission error (While installing WordPress I get this error "Sorry, but I can’t write the wp-config.php file." )



I can create the file manually but I don't want to do this. I wasn't to make it working correctly.



What I did to set up permission after installing lamp



cd /var/wwww/
sudo chown -R username:www-data /var/www/html/
sudo chmod 775 /var/www/html/
sudo chmod g+s /var/www/html/



Later I tried some solutions like sudo chown -R [USER NAME]:[USER NAME] /var/www which I found on askubuntu.



I don't know much about permission issue trying solution blindly.



Can you please help me on this to make it working? :)



Output of ls -l /var/www

Output of total 4
drwxrwsr-x 3 h3mdsa h3mdsa 4096 Jun 12 16:40 html


(Thanks @Jos for comment)



Thanks in advanced,

Md Al Amin


More From » 14.04

 Answers
2

You were close: the directory /var/www/ should be owned by www-data (as a user) and www-data as a group. So the proper command, if things get messed up, is:



sudo chown -R www-data:www-data /var/www


[#19591] Friday, November 25, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ravturtl

Total Points: 335
Total Questions: 132
Total Answers: 110

Location: Tanzania
Member since Wed, Feb 24, 2021
3 Years ago
;