Files in the etc folder are now read-only (you need to change the grub settings). Before that, editing was allowed, I don’t know why it happened.

  • Do chmod, chown commands help? - Vladimir Martyanov
  • What is the Linux version? Try to change the root? - Hermann Zheboldov
  • chmod and chown do not help. Ubuntu 14.04.1. And how to change the root? - user191831
  • Already answered below - Hermann Zheboldov

1 answer 1

Changing permissions in the /etc directory, as in any other directory, may be necessary only in special cases. Editing the configuration file is of course not the case.

The process that performs editing (more precisely, reading and writing) of a file outside the user's home directory (and several special directories /tmp , /var/tmp , etc.) must be started with root privileges:

 $ sudo имя.вашего.любимого.редактора /путь/к/редактируемому/файлу