Attention: Debian User Forum members:
There is a file on my Debian operating system ( Debian version 9.3 ) named "network-interface.conf." The path to this file is "/etc/init/network-interface.conf." After initially attempting to edit it in VIM, and then saving the changes using the command ":wq," I received the error message that the file was read only, but that I could use "!" to override the permissions on the file. After typing the command ":wq!," I received the same error message. I searched online, and learned that I could use the command "sudo chmod -R u+rw /etc/init/network-interface.conf" to change the permissions on the file to write permissions. After typing in that command, I again attempted to edit the file, but I received the same above-mentioned error message. Any suggestions regarding why I am not able to edit the file? Thank you .
Russell E. Willis
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Debian version 9.3.
- cds60601
- df -h | participant
- Posts: 717
- Joined: 2017-11-25 05:58
- Location: Florida
- Has thanked: 133 times
- Been thanked: 63 times
Re: Debian version 9.3.
is sudo installed? Is your user added to sudoers?
Alternatively, you can su to root then mod as you see fit with the caveat there is danger to your system when su'ing if you don't know what you are doing.
Cheers
Chris
Alternatively, you can su to root then mod as you see fit with the caveat there is danger to your system when su'ing if you don't know what you are doing.
Cheers
Chris
Supercalifragilisticexpialidocious
Re: Debian version 9.3.
Using the command
is wrong. For three reasons.
This runs the vi/vim editor with root's permissions. After making the desired changes in vi/vim, the command ":wq" should now be able to save the updated file successfully.
Code: Select all
chmod -R u+rw
- 1. The "-R" option says to apply the permissions to all files in a directory and recursively through all subdirectories. In this case, you werre attempting to change permissions on a specific file, so the -R option should be removed.
2. This gives the owner of the file read and write permission on the file. In this case, the owner of the file (safe assumption the owner is root) already has read and write permissions, so the command effectively does nothing.
3. Most important: This is basically the wrong approach.
Code: Select all
sudo vi /etc/init/network-interface.conf
-
- Posts: 3
- Joined: 2018-07-14 12:47
Re: Debian version 9.3.
Attention: Tynman:
Your suggestion solved the problem. After editing the file "/etc/init/network-interface.conf," the changes were saved to the file. Thank you.
Russell E. Willis
Your suggestion solved the problem. After editing the file "/etc/init/network-interface.conf," the changes were saved to the file. Thank you.
Russell E. Willis
-
- Posts: 20
- Joined: 2012-06-06 17:03
Re: Debian version 9.3.
This is interesting because typically I from a root terminal run
dbus-launch krusader
and right click and edit a file with root text editor.
dbus-launch krusader
and right click and edit a file with root text editor.
Re: Debian version 9.3.
and once again, there's several reasons why you shouldn't start a graphical app as root.Johen Scott wrote:This is interesting because typically I from a root terminal run
dbus-launch krusader
and right click and edit a file with root text editor.
it's not so bad with a file manager (i do it too sometimes), but it's not "interesting", and the convention is to use a command line editor.
debian even has the 'sudoedit' command.