0

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.

terdon
  • 100,812
Alcamech
  • 23
  • 1
  • 1
  • 5
  • What file system are you using ? show the output of sudo lsattr /etc/apache2/sites-enabled/000-default.conf – Panther Jun 02 '14 at 18:01
  • operation not supported while reading flags on /etc/apache2/sites-enabled/000-default.conf – Alcamech Jun 02 '14 at 18:24
  • 3
    /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 https://help.ubuntu.com/14.04/serverguide/httpd.html#http-configuration – Panther Jun 02 '14 at 19:05
  • I changed the permissions for the file in /etc/apache2/sites-available/000.default.conf and It still is read only. – Alcamech Jun 03 '14 at 23:02
  • Read only by what user? If the file is ro by root, reboot and run fsck See http://askubuntu.com/questions/353732/how-to-use-fsck-in-ubuntu – Panther Jun 03 '14 at 23:05
  • I am trying to edit the file but It is only r,w,x for the owner of the file which is root. – Alcamech Jun 03 '14 at 23:08
  • 1
    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. – Panther Jun 03 '14 at 23:11

1 Answers1

1

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