Getting "unable to create file '/run/user/1000/dconf/user': Permission denied"

29,567

Solution 1

The issue can be caused by running a GUI after changing user using su command. Certain environmental variables are not changed causing the error. See

https://bugzilla.redhat.com/show_bug.cgi?id=753882

Try running the program by logging in as that user directly.

Solution 2

#!/bin/bash
# rmdconfuser - remove dconf user

if [ -e "/run/user/1000/dconf/user" ] 
then
    rm -f /run/user/1000/dconf/user
fi

# Uncomment the next line if mate-settings-daemon is eating up too much memory
# killall -9 mate-settings-daemon

then execute chmod +x rmdconfuser and place rmdconfuser into your ~/bin/ or /usr/local/bin as root and sudo rmdconfuser to stop the problem. You can also make rmdconfuser set its own uid to root, so you can run it without being root yourself.

Unfortunatelly this is only a work around. The problem may appear again & again.

Solution 3

chown 1000:1000 /run/user/1000/dconf/user

Share:
29,567

Related videos on Youtube

einpoklum
Author by

einpoklum

Made my way from the Olympus of Complexity Theory, Probabilistic Combinatorics and Property Testing to the down-to-earth domain of Heterogeneous and GPU Computing, and now I'm hoping to bring the gospel of GPU and massive-regularized parallelism to DBMS architectures. I've post-doc'ed at the DB architecture group in CWI Amsterdam to do (some of) that. I subscribe to most of Michael Richter's critique of StackOverflow; you might want to take the time to read it. If you listen closely you can hear me muttering "Why am I not socratic again already?"

Updated on September 18, 2022

Comments

  • einpoklum
    einpoklum almost 2 years

    I use GNU/Linux Mint 18.2 (based on Ubuntu 16.04). Very recently, I've started seeing the following error message, repeated many times, when I start some GUI apps (e.g. meld):

    unable to create file '/run/user/1000/dconf/user': Permission denied.  dconf will not work properly.
    

    Now, I'm able to work around this by manually changing the ownership of /run/user/1000/dconf/user, but that's kind of a lame hack and certainly not robust.

    Why have I been seeing this error and what's the "right way" to avoid it (if any)?

    • frayser
      frayser almost 6 years
      I think it's caused by running certain GUI programs as superser: I get this same problem when running ktsu to open a terminal app (called terminator) as a root window. Apparently terminator is using my UID instead of root's in /run/user/UID/user, and that can change the owner of the file to root causing "permission denied" when I run terminator as myself.
  • einpoklum
    einpoklum over 6 years
    Interesting user name you have there. Why would I have the mate-settings-daemon running, though?
  • Work Around
    Work Around over 6 years
    sorry - because it caused the problem of eating the ram on my machine running mate on mint. If you have no mate then simply forget the last line.
  • einpoklum
    einpoklum over 5 years
    But will this not revert to the incorrect permissions later? e.g. by being recreated?