News:

SMF - Just Installed!

Main Menu

No permission to edit config files

Started by mahesh, Aug 04, 2023, 08:16 AM

Previous topic - Next topic

mahesh

I have a problem with editing config files. E.g. in the opt/ or in the etc/ folder. I understand that I need to do this as root. But even with
sudo gedit path/filename
it doesn't work:

daniel@Pi4: $ sudo gedit opt/traccar/conf/traccar.xml
mkdir: cannot create directory "/run/user /0': Permission denied
Authorization required, but no authorization protocol specified
(gedit: 16128): Gtk-WARNING **: 22:08:45.591: cannot open display: : 0
daniel@Pi4: $


With sudoedit I could edit the file but when I tried to save it (overwrite the old one) I got the error message ,,no permission".
I have the permission to execute sudo since ,,sudo -i" works:

daniel@Pi4:~$ sudo -i [sudo] password for daniel:
root@Pi4:~#


I tried gedit admin/// as well. Didn't work as well.
Of course, I tried to edit the file with a graphical editor as well. Same result.
And I tried to edit other config files (e.g. in etc/): same result.
What am I doing wrong?

I use Ubuntu 23.04 (GNU/Linux 6.2.0-1007-raspi aarch64) on a Raspberry Pi 4 B (8GB)