Write permissions in /var/www folder
12,721
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
Related videos on Youtube
Author by
xylar
Updated on September 18, 2022Comments
-
xylar almost 2 years
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
ormkdir
in/var/www/
, I am still getting "Permission denied". What am I missing?-
chaos over 10 yearsCan you post the output of the command
groups
with your user <username>, that should have access? -
nickanor over 10 yearsthis line
sudo chown -R www-data:www-data /var/www
made the directory to userwww-data
so other user can't write, why not try something likechown -R :www-data /var/www
-
web.learner over 10 years@nickanor Perhaps you could add that as an answer?
-
-
5d41402abc4 about 10 yearsbe careful when you use 777 permission. Your folders or files will be accessed by everyone. For security reason this is not recommended.