Unable to change permissions for apache file 000-default.conf
This is because when you use 'sudo' in terminal, the permissions are being changed for 'root', but when you go into your file browser, you are no longer a 'root' user, you become regular user, and in terminal you changed permission for 'root'.
So first change the ownership and then change the permission for new user.
Or right click the file browser and 'open as administrator', and then you can access a file as 'root', and be able to rename, copy/paste/modify/delete the file as you do in Windows OS.
To know how to change the ownership, follow the links below:
https://help.ubuntu.com/community/FilePermissions
http://linuxers.org/howto/how-change-ownership-file-linux
Related videos on Youtube
Alcamech
Updated on September 18, 2022Comments
-
Alcamech over 1 year
I am trying to change the permissions for the apache file
/etc/apache2/sites-enabled/000-default.conf
when I input the command
sudo chmod 755 000-default.conf
the file still stays to read only.
-
Panther almost 10 yearsWhat file system are you using ? show the output of
sudo lsattr /etc/apache2/sites-enabled/000-default.conf
-
Alcamech almost 10 yearsoperation not supported while reading flags on /etc/apache2/sites-enabled/000-default.conf
-
Panther almost 10 years/etc/apache2/sites-enabled/000-default.conf is a link to /etc/apache2/sites-available/000-default.conf . You have to set permissions and edit the sites-available file see help.ubuntu.com/14.04/serverguide/httpd.html#http-configuration
-
Alcamech almost 10 yearsI changed the permissions for the file in /etc/apache2/sites-available/000.default.conf and It still is read only.
-
Panther almost 10 yearsRead only by what user? If the file is ro by root, reboot and run fsck See askubuntu.com/questions/353732/how-to-use-fsck-in-ubuntu
-
Alcamech almost 10 yearsI am trying to edit the file but It is only r,w,x for the owner of the file which is root.
-
Panther almost 10 yearsWell, IMO, you should only edit the file as root. Better, disable the default.conf and write a specific one for your site, keep the original as a template.
-