I use AWS vps server and apache2 is installed in it. I want to edit a file "index.html" from 2 different accounts (i.e. 1st user "ubuntu" and second user "www-data"). By now, I try to edit the file but I got permission error so first I change (chown
) permission to "ubuntu " and edit file and again change (chown
) permission back to "www-data" otherwise I will get permission error in web browser.
I used chmod 777 index.html
but this didn't help.
Please help me finding some good solution. Because this is tough to edit. I do have sudo permission if needed.
Thanks in advance!
You have two options:
ubuntu
and www-data
users to this group. Then set with chgrp
the group of the file and finally give the right permissions to the group with chmod
.setfacl
command. You can read about the command here and here.