Tuesday, April 30, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 13119  / 3 Years ago, mon, july 19, 2021, 11:19:49

I followed the steps from https://askubuntu.com/a/51337/115811 to add my user to a www-data group and set the /var/www/ dir group writeable.



sudo adduser <username> www-data
sudo chown -R www-data:www-data /var/www
sudo chmod -R g+rw /var/www


This is /var/www/ contents:



drwxrwsr-x  2 www-data www-data 4096 Oct 25 08:13 ./
drwxr-xr-x 14 root root 4096 Oct 17 08:47 ../
-rwxrwsr-x 1 www-data www-data 177 Oct 17 23:51 index.html*


However when I try to git clone or mkdir in /var/www/, I am still getting "Permission denied". What am I missing?


More From » permissions

 Answers
7

this line sudo chown -R www-data:www-data /var/www made the directory to user www-data so other user can't write, why not try something like chown -R :www-data /var/www


[#28757] Wednesday, July 21, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
asketbridiculou

Total Points: 168
Total Questions: 116
Total Answers: 115

Location: Antigua and Barbuda
Member since Sat, Jan 28, 2023
1 Year ago
asketbridiculou questions
Thu, Dec 22, 22, 08:36, 1 Year ago
Thu, Jan 27, 22, 14:28, 2 Years ago
Tue, Nov 29, 22, 21:50, 1 Year ago
Sun, Jun 20, 21, 04:42, 3 Years ago
Sun, Aug 15, 21, 08:42, 3 Years ago
;