emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs creates emacs.d/ as root when using sudo


From: Stefan Monnier
Subject: Re: Emacs creates emacs.d/ as root when using sudo
Date: Tue, 02 Jul 2019 00:21:38 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>     $ sudo emacs /etc/default/motd-news

I'd consider the above as a pilot error.

If you use sudo naively like above, the $HOME is still that of the
invoking user, so you're going to have these kinds of problems with all
kinds of programs (I also consider it a serious security issue because
you'll execute as root the user's ~/.emacs or in other cases it'll be
the user's ~/.bashrc or whatever else, and I'd generally assume that
those files were not written under the assumption that they may be run
as root, so they may introduce all kinds of problems).


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]