Unable to change permissions for apache file 000-default.conf

10,119

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

Share:
10,119

Related videos on Youtube

Alcamech
Author by

Alcamech

Updated on September 18, 2022

Comments

  • Alcamech
    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
      Panther almost 10 years
      What file system are you using ? show the output of sudo lsattr /etc/apache2/sites-enabled/000-default.conf
    • Alcamech
      Alcamech almost 10 years
      operation not supported while reading flags on /etc/apache2/sites-enabled/000-default.conf
    • Panther
      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-configurat‌​ion
    • Alcamech
      Alcamech almost 10 years
      I changed the permissions for the file in /etc/apache2/sites-available/000.default.conf and It still is read only.
    • Panther
      Panther almost 10 years
      Read 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
      Alcamech almost 10 years
      I am trying to edit the file but It is only r,w,x for the owner of the file which is root.
    • Panther
      Panther almost 10 years
      Well, 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.