1

I am new to Ubuntu (and Linux).

As you might know after installing LAMP for Ubuntu, the default folder for the files /www lies inside the /var folder

The /var folder lies in the root.

Now, of course, I will need to make changes to the web files kept inside the /www folder to complete my website.

Now when I add this folder to the Atom, and try to edit any file e.g. index.php, I am not able to

I can understand that this is a file permission issue of the user and group. I have searched a lot but am unable to resolve the issue.

Zanna
  • 70,465

1 Answers1

1

LAMP so I presume it's an APACHE setup. Two things to do

  1. Add yourself to the apache group www-data

    sudo adduser $USER www-data
    
  2. Make apache user the owner of the /var/www/floder_name folder

    sudo chown -R www-data:www-data /var/www/folder_name
    
  3. Logout and back in again for it to take effect.

Bonus: Make the default user and group www-data so you don't have to keep updating

sudo setfacl -d -m u:www-data:rwx,g:www-data:rwx,o::rx /var/www/folder_name

Note: I used a 775 permission, you can use that which suits your setup!

George Udosen
  • 36,677