Control: severity -1 important

Adam Lackorzynski <a...@os.inf.tu-dresden.de> writes:

> I had the same issue. Turned out my personal .emacs.d/eln-cache
> directory and its folders belonged to root:

> $ ls -la $HOME/.emacs.d/eln-cache
> total 16
> drwxr-xr-x 4 root root  4096 Aug 21 19:32 .
> drwx------ 4 adam users 4096 Aug 19 19:43 ..
> drwxr-xr-x 2 root root  4096 Aug 21 19:32 28.1-20961986
> drwxr-xr-x 2 root root  4096 Aug 19 19:43 28.1-aa5da5cc

> chown'ing it to me fixed it.

Oh, good catch!  The same thing was true of mine.

I think the dates were when I upgraded Emacs.  Let me take a guess: are
you also old-school and use su from a regular user account when installing
new packages?  HOME gets overridden by su, but LOGNAME and USER do not,
and I suspect something in Emacs is deciding where to write files based on
USER, and the installation process of emacs-lucid creates the eln-cache
directory for some reason.

I'm downgrading the severity of this bug because I suspect the average
user using sudo may not run into it (although the maintainer should feel
free to raise the severity again if they disagree).  If I'm right, the
best place to solve the problem may be in the Debian maintainer scripts,
overwriting USER (and possibly LOGNAME, not sure if it matters) to some
safe value like root while performing the installation.  This may also be
necessary to do when installing Emacs add-on packges; I'm not sure.

I've removed the directory with the wrong ownership and upgraded again
with USER and LOGNAME set to root, and now everything works fine.  (Well,
my laptop gets extremely hot the first time I start the new Emacs, but I
assume that's expected for the new compilation system.)

-- 
Russ Allbery (r...@debian.org)              <https://www.eyrie.org/~eagle/>

Reply via email to