1

if i'm not owner

i'm using visual studio editor

i can't change the code in any file in /var/www/html/

because of this command

sudo chown -Rf www-data:www-data /var/www/html/

i need to know how can i be able to change the files

sudo -Rf chown www-data:username /var/www/html/

sudo chmod -Rf 775 /var/www/html/

those lines can help !?

I'm V
  • 31
  • 1
  • 7

1 Answers1

0

The folder /var/www/html is owned by user www-data and group www-data. So, as suggested by @Serg, the solution is to add yourself to the group that owns this file, in this case: the group www-data:

sudo usermod -G www-data username

Then, change permissions of the directory to 775:

chmod -R 775 /var/www/html

and you should be able to edit the file.

Jos
  • 29,224