Subject: bug#32413: 25.2; When run as root, emacs writes dconf files in a non-root user's /run/user/XXX directory

From: Eli Zaretskii <[email-masked]>
Date: Fri, 10 Aug 2018 16:47:17 +0300

> Date: Fri, 10 Aug 2018 14:57:58 +0200
> From: Vincent Lefevre <[email-masked]>
> Cc: [email-masked]
> 
> > > Emacs should never create files/directories if the user hasn't
> > > explicitly asked it to do that
> > 
> > I don't agree with this principle, not in this general form.  (The "in
> > a directory owned by another user" part, to which I think I agree, as
> > written, was not a qualification for this general statement, so it
> > doesn't count for the purposes of the principle itself.)
> > 
> > As just one random example of what Emacs "should never do", we write
> > the customizations to a file "without the user's explicit request".
> 
> I don't understand why there is anything to write if the user
> hasn't customized anything.

That was just an example of something that doesn't explicitly ask for
writing a file.  Another example is Eshell: when it exits, it writes
files in the ~/.eshell directory.

More generally, certain Emacs features might write files "without user
explicitly asking" as part of providing some feature that needs to be
persistent between sessions.  I think that's quite allright, which is
why I disagree with the general principle you were trying to
establish.

> And if the user introduces some customization, then this can be
> regarded as an explicit write operation (due to the action of the
> user in this sense).

Well, in that case, let's regard user using dconf as an explicit write
permission ;-)

Seriously, though: if your principle can be subverted in some
situations, then we need to define what situations are those.  In
particular, how is what you report different from what Eshell does on
exit?