Error editing any config files (Diffuse: error writing....)

I am using Sway.
I tried using google to search for this problem and I get literally nothing.
Thunar documentation gives me no options for changing file permissions; I am guessing it’s related to this.

I come from using KDE so please be patient with me :slight_smile:

When I try to edit my config file, it fails. I’m returned with “Diffuse:error writing ”

Could you post the output of:

ls -al /path/to/file

replace /path/to/file with the real path to the file you are trying to edit.

Also run the following command to check if everything under your home directory belongs to your user:

find $HOME ! -user $USER

This shouldn’t return anything if that is the case.

1 Like
the command lists everything as root
> -total 1380
drwxr-xr-x 83 root root    4096 Oct 31 15:33 .
drwxr-xr-x 17 root root    4096 Oct 25 12:49 ..
-rw-r--r--  1 root root      44 Oct 25 12:53 adjtime
drwxr-xr-x  3 root root    4096 Oct 25 12:53 alsa
-rw-r--r--  1 root root       0 Oct 18 14:01 arch-release
-rw-r--r--  1 root root       0 Jul 25 07:16 arptables.conf
drwxr-xr-x  3 root root    4096 Oct 25 12:49 audit
drwxr-xr-x  3 root root    4096 Oct 25 12:53 avahi
-rw-r--r--  1 root root      28 Jan  8  2022 bash.bash_logout
-rw-r--r--  1 root root     618 Jan  8  2022 bash.bashrc
-rw-r--r--  1 root root    2403 Oct 23 12:34 bind.keys
-rw-r--r--  1 root root     535 Aug  8 12:27 bindresvport.blacklist
drwxr-xr-x  2 root root    4096 Oct 24 12:48 binfmt.d
dr-xr-xr-x  2 root root    4096 Oct 25 12:53 bluetooth
drwxr-xr-x  4 root root    4096 Oct 25 12:49 ca-certificates
drwxr-xr-x  2 root root    4096 Oct 25 12:53 conf.d
-rw-------  1 root root     576 Oct 25 12:49 crypttab
drwxr-xr-x  2 root root    4096 Oct 25 13:13 daxctl.conf.d
drwxr-xr-x  3 root root    4096 Oct 25 12:53 dconf
drwxr-xr-x  2 root root    4096 Oct 25 12:53 default
drwxr-xr-x  2 root root    4096 Jun 30 13:19 depmod.d
-rw-r--r--  1 root root     174 Jun 11 01:07 diffuserc
-rw-r--r--  1 root root   27836 Sep 26 00:02 dnsmasq.conf
-rw-r--r--  1 root root     685 Jun 13 05:52 e2scrub.conf
-rw-r--r--  1 root root       0 Jul 25 07:16 ebtables.conf
-rw-r--r--  1 root root     180 Oct 25 12:54 environment
drwxr-xr-x  3 root root    4096 Oct 25 12:53 eos-apps-info
-rw-r--r--  1 root root     628 Oct 25 02:07 eos-log-tool.conf
-rw-r--r--  1 root root    7433 Oct  9 07:39 eos-quickstart.conf
-rw-r--r--  1 root root    1668 Oct 21 01:15 eos-rankmirrors.conf
-rw-r--r--  1 root root       0 Oct 25 12:53 eos-repo-before-arch-repos.once
-rw-r--r--  1 root root    6100 Oct 19 08:23 eos-script-lib-yad.conf
-rw-r--r--  1 root root     547 Oct 19 08:23 eos-sendlog.conf
-rw-r--r--  1 root root    2501 Apr 30  2022 eos-update-notifier.conf
-rw-r--r--  1 root root    1362 Jul 25 07:16 ethertypes
-rw-r--r--  1 root root     429 Aug  9 13:33 exports
drwxr-xr-x  2 root root    4096 Aug  9 13:33 exports.d
drwxr-xr-x  2 root root    4096 Oct 25 12:53 firewall
drwxr-xr-x  8 root root    4096 Oct 25 12:53 firewalld
drwxr-xr-x  3 root root    4096 Oct 25 12:49 fonts
-rw-r--r--  1 root root     597 Oct 25 12:49 fstab
-rw-r--r--  1 root root     694 Sep 12 09:59 fuse.conf
-rw-r--r--  1 root root    2584 Oct  7 07:17 gai.conf
drwxr-xr-x  2 root root    4096 Oct 25 14:48 geoclue
-rw-r--r--  1 root root     939 Oct 25 12:53 group
-rw-r--r--  1 root root     905 Oct 25 12:53 group-
drwxr-xr-x  2 root root    4096 Oct 25 12:49 grub.d
-rw-------  1 root root     836 Oct 25 12:53 gshadow
-rw-------  1 root root     802 Oct 25 12:53 gshadow-
drwxr-xr-x  3 root root    4096 Oct 25 12:53 gss
drwxr-xr-x  2 root root    4096 Oct 25 12:53 gssproxy
drwxr-xr-x  2 root root    4096 Oct 25 12:53 gtk-2.0
drwxr-xr-x  2 root root    4096 Oct 25 12:53 gtk-3.0
-rw-r--r--  1 root root     450 Feb 18  2021 healthd.conf
-rw-r--r--  1 root root      73 Oct 18 14:01 host.conf
-rw-r--r--  1 root root       7 Oct 25 12:53 hostname
-rw-r--r--  1 root root     183 Oct 25 12:53 hosts
-rw-r--r--  1 root root    5799 Aug  9 13:33 idmapd.conf
drwxr-xr-x  2 root root    4096 Oct 25 12:49 ifplugd
drwxr-xr-x  2 root root    4096 Oct 25 12:53 ImageMagick-7
-rw-r--r--  1 root root     989 Oct 21 11:27 imv_config
drwxr-xr-x  4 root root    4096 Oct 25 12:49 initcpio
-rw-r--r--  1 root root     714 Jan 29  2022 inputrc
drwxr-xr-x  2 root root    4096 Oct 25 12:49 iproute2
drwxr-xr-x  2 root root    4096 Oct 25 12:49 iptables
-rw-r--r--  1 root root      27 Oct 25 12:53 issue
drwxr-xr-x  3 root root    4096 Oct 25 12:49 kernel
drwxr-xr-x  2 root root    4096 Jul  7  2020 keyutils
-rw-r--r--  1 root root     369 Aug 30 11:37 krb5.conf
-rw-r--r--  1 root root   92135 Oct 31 15:32 ld.so.cache
-rw-r--r--  1 root root     117 Oct 18 14:01 ld.so.conf
drwxr-xr-x  2 root root    4096 Oct 25 12:49 ld.so.conf.d
-rw-r-----  1 root root     191 Apr 21  2022 libaudit.conf
drwxr-xr-x  3 root root    4096 Oct 25 13:13 libblockdev
drwxr-xr-x  2 root root    4096 Jun 12 03:33 libinput
drwxr-xr-x  2 root root    4096 Oct 25 12:49 libnl
-rw-r--r--  1 root root      24 Sep 28 06:32 libva.conf
-rw-r--r--  1 root root     230 Oct 25 12:49 locale.conf
-rw-r--r--  1 root root   10016 Oct 25 12:49 locale.gen
lrwxrwxrwx  1 root root      39 Oct 25 12:49 localtime -> /usr/share/zoneinfo/America/Los_Angeles
-rw-r--r--  1 root root   14347 Oct 18 12:26 login.defs
-rw-r--r--  1 root root     686 May 25 23:17 logrotate.conf
drwxr-xr-x  2 root root    4096 Oct 25 12:53 logrotate.d
-rw-r--r--  1 root root     114 Oct 25 12:53 lsb-release
drwxr-xr-x  5 root root    4096 Oct 25 12:49 lvm
-r--r--r--  1 root root      33 Oct 25 12:49 machine-id
-rw-r--r--  1 root root     272 May  4  2021 mailcap
-r--r--r--  1 root root    9545 Mar 31  2022 mail.rc
-rw-r--r--  1 root root    6249 Sep 25 05:54 makepkg.conf
-rw-r--r--  1 root root    5205 Oct 15 12:51 man_db.conf
-rw-r--r--  1 root root    2349 Mar 30  2022 mdadm.conf
-rw-r--r--  1 root root   69857 May  4  2021 mime.types
-rw-r--r--  1 root root     782 Jun 13 05:52 mke2fs.conf
-rw-r--r--  1 root root    2528 Oct 25 12:53 mkinitcpio.conf
drwxr-xr-x  2 root root    4096 Oct 25 12:49 mkinitcpio.d
drwxr-xr-x  4 root root    4096 Oct 25 12:53 ModemManager
drwxr-xr-x  2 root root    4096 Oct 25 12:53 modprobe.d
drwxr-xr-x  2 root root    4096 Oct 24 12:48 modules-load.d
lrwxrwxrwx  1 root root      19 Oct 18 14:01 mtab -> ../proc/self/mounts
-rw-r--r--  1 root root    2614 Oct 22 09:11 mtools.conf
-rw-r-----  1 root named   1219 Oct 23 12:34 named.conf
-rw-r--r--  1 root root   11233 Aug  6 15:04 nanorc
drwxr-xr-x  2 root root    4096 Oct 25 12:53 nbd-server
drwxr-xr-x  3 root root    4096 Oct 25 13:13 ndctl
drwxr-xr-x  2 root root    4096 Oct 25 13:13 ndctl.conf.d
-rw-r--r--  1 root root     767 Aug  8 12:27 netconfig
drwxr-xr-x  5 root root    4096 Oct 25 12:49 netctl
drwxr-xr-x  7 root root    4096 Oct 25 12:53 NetworkManager
-rw-r--r--  1 root root    1451 Aug  9 13:33 nfs.conf
-rw-r--r--  1 root root    3604 Aug  9 13:33 nfsmount.conf
-rw-r--r--  1 root root     846 Aug 10 00:38 nftables.conf
drwxr-xr-x  2 root root    4096 Oct 25 12:53 nginx
-rw-r--r--  1 root root    2484 Jun 26 12:21 nilfs_cleanerd.conf
-rw-r--r--  1 root root    2717 Oct  7 07:17 nscd.conf
-rw-r--r--  1 root root     359 Oct 18 14:01 nsswitch.conf
-rw-r--r--  1 root root     706 Jul  1  2020 ntp.conf
drwxr-xr-x  2 root root    4096 Oct 25 12:49 openldap
-rw-r--r--  1 root root     665 Oct  1  2019 openswap.conf
drwxr-xr-x  4 root root    4096 Oct 25 12:53 openvpn
lrwxrwxrwx  1 root root      21 Oct 25 12:49 os-release -> ../usr/lib/os-release
-rw-r--r--  1 root root    3044 Sep  8 09:01 pacman.conf
drwxr-xr-x  4 root root    4096 Oct 25 12:49 pacman.d
drwxr-xr-x  2 root root    4096 Oct 29 13:24 pam.d
-rw-r--r--  1 root root    1749 Oct 25 12:53 passwd
-rw-r--r--  1 root root    1749 Oct 25 12:53 passwd-
drwxr-xr-x  2 root root    4096 Oct 25 12:49 pinentry
drwxr-xr-x  8 root root    4096 Oct 25 12:53 pipewire
drwxr-xr-x  2 root root    4096 Oct 25 12:49 pkcs11
drwxr-xr-x  3 root root    4096 Oct 25 12:53 polkit-1
drwxr-xr-x  7 root root    4096 Oct 25 12:53 ppp
-rw-r--r--  1 root root    1020 Oct 18 14:01 profile
drwxr-xr-x  2 root root    4096 Oct 25 12:53 profile.d
-rw-r--r--  1 root root    3196 Sep 22 00:43 protocols
drwxr-xr-x  2 root root    4096 Oct 25 12:53 pulse
-rw-------  1 root root       0 Oct 25 12:49 .pwd.lock
drwxr-xr-x  2 root root    4096 Oct 31  2021 rc_keymaps
-rw-r--r--  1 root root    7692 Oct 31  2021 rc_maps.cfg
drwxr-xr-x  2 root root    4096 Oct 25 12:53 rdnssd
-rw-r--r--  1 root root    1268 Sep  1 08:07 reflector-simple.conf
-rw-r--r--  1 root root    1481 Sep  1 08:07 reflector-simple-tool.conf
-rw-r--r--  1 root root    1814 Jul  7  2020 request-key.conf
drwxr-xr-x  2 root root    4096 Oct 25 12:53 request-key.d
-rw-r--r--  1 root root     280 Oct 31 15:33 resolv.conf
-rw-r--r--  1 root root     255 Dec 29  2020 resolvconf.conf
-rw-r--r--  1 root root    1634 Oct  7 07:17 rpc
-rw-r--r--  1 root root     172 Oct 20 23:15 rsyncd.conf
-rw-r--r--  1 root root      26 Oct 25 12:53 sddm.conf
drwxr-xr-x  2 root root    4096 Oct 25 12:53 sddm.conf.d
-rw-r--r--  1 root root     139 Oct 18 14:01 securetty
drwxr-xr-x  2 root root    4096 Oct 25 12:49 security
-rw-r--r--  1 root root   10593 Feb 18  2021 sensors3.conf
drwxr-xr-x  2 root root    4096 Feb 18  2021 sensors.d
-rw-r--r--  1 root root  298990 Sep 22 00:43 services
-rw-------  1 root root     957 Oct 25 12:53 shadow
-rw-------  1 root root     852 Oct 25 12:53 shadow-
-rw-r--r--  1 root root     102 Oct 25 12:53 shells
drwxr-xr-x  3 root root    4096 Oct 25 12:53 skel
-rw-r--r--  1 root root    2030 Aug 16 12:44 slsh.rc
-rw-r--r--  1 root root    6699 Mar  1  2022 smartd.conf
drwxr-xr-x  2 root root    4096 Oct 25 12:53 ssh
drwxr-xr-x  5 root root    4096 Oct 25 12:49 ssl
-rw-r--r--  1 root root      25 Oct 25 12:53 subgid
-rw-r--r--  1 root root       0 Oct 18 14:01 subgid-
-rw-r--r--  1 root root      25 Oct 25 12:53 subuid
-rw-r--r--  1 root root       0 Oct 18 14:01 subuid-
-rw-r--r--  1 root root    4557 Oct 23 07:59 sudo.conf
-r--r-----  1 root root    3319 Oct 23 07:59 sudoers
drwxr-x---  2 root root    4096 Oct 25 12:53 sudoers.d
-rw-r--r--  1 root root    9800 Oct 23 07:59 sudo_logsrvd.conf
drwxr-xr-x  3 root root    4096 Oct 25 12:53 sway
drwxr-xr-x  2 root root    4096 Oct 24 12:48 sysctl.d
drwxr-xr-x  5 root root    4096 Oct 25 12:49 systemd
-rw-r--r--  1 root root      20 Oct 25 12:49 timezone
drwxr-xr-x  2 root root    4096 Oct 24 12:48 tmpfiles.d
drwxr-xr-x  3 root root    4096 Oct 25 12:49 tpm2-tss
-rw-r--r--  1 root root     738 Oct 13  2020 trusted-key.key
-rw-r--r--  1 root root     938 Jul  1  2020 ts.conf
drwxr-xr-x  4 root root    4096 Oct 25 12:49 udev
drwxr-xr-x  2 root root    4096 Oct 25 13:13 udisks2
-rw-r--r--  1 root root     208 Oct 29 13:24 .updated
-rw-r--r--  1 root root     568 Apr 21  2021 updatedb.conf
-rw-r--r--  1 root root      94 Jan  6  2020 update-menus.conf
drwxr-xr-x  2 root root    4096 Oct 25 12:53 UPower
-rw-r--r--  1 root root    1522 Mar  7  2022 usb_modeswitch.conf
drwxr-xr-x  2 root root    4096 Mar  7  2022 usb_modeswitch.d
-rw-r--r--  1 root root   78853 Mar  7  2022 usb_modeswitch.setup
-rw-r--r--  1 root root      10 Oct 25 12:49 vconsole.conf
-rw-r--r--  1 root root      51 Mar 12  2022 vdpau_wrapper.cfg
drwxr-xr-x  2 root root    4096 Oct 25 12:53 vpnc
-rw-r--r--  1 root root    5026 Mar 20  2022 wgetrc
-rw-r--r--  1 root root     380 Oct 19 01:49 whois.conf
drwxr-xr-x  2 root root    4096 Aug  3 00:40 wpa_supplicant
drwxr-xr-x  4 root root    4096 Oct 25 12:49 X11
-rw-r--r--  1 root root     681 Feb  1  2022 xattr.conf
drwxr-xr-x 11 root root    4096 Oct 25 12:53 xdg
drwxr-xr-x  2 root root    4096 Oct 25 12:53 xinetd.d
drwxr-xr-x  2 root root    4096 Oct 25 12:53 xl2tpd

and the other command returns nothing

Seems you don’t have created a user, separate from the root account? If so, look here.

Not sure what file you are trying to edit.

If it is a system file owned by root, you could try editing it in a terminal using

sudo nano /path/to/file

For example: sudo nano /etc/fstab

When done editing, press in turn Ctrl-O, Enter and finally Ctrl-X.

I want to edit a few files, in /etc/
like sddm.config, <sway/sway.config. Is there a way to apply these settings effectively to the whole directory, so that I can edit the files with nano, or gui text editors? Neovim, Thunar?

But, thanks a ton! I will try editing the single files with these commands and confirm it works.

I am not sure what settings you have in mind but personally I would not change ownership or permissions of systems files/folders for being able to edit them.

Also using a GUI as root is not recommended.
See:https://wiki.archlinux.org/title/Running_GUI_apps_as_root

Whenever I need to edit a system file I just get elevated privilege with sudo and use nano to do it in a terminal.

@automatepl0x
Why are you editing those config files? Did you get an update for them as .pacnew files? Can you show the exact command you are using?