-
-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please don't use sudo -E #11
Comments
Thanks! That does sound like it could become a problem but strangely I've never had an issue with it (yet). What do you use instead of |
Was it maybe a AFAIK |
Yeah, I never use |
IIRC from past discussions, the exact behaviour of |
Relevant comment from guix/scripts/pull.scm: ;; XXX: Ubuntu's 'sudo' preserves $HOME by default, and thus the second |
@emixa-d I gotta agree with Ludovic Courtès there regarding it being a bug-like behavior from part of Ubuntu. IMO this patch/PR still applies, especially since the configuration in this repo is aimed at Guix System which uses unpatched sudo (unlike Ubuntu, which seems to be the only distro messing with sudo). |
Hi! Thank you very much for this great Guix resource, it's been very useful to get everything set up.
I suggest you stop using
sudo -E
in your config and examples. It will make the Guile auto-compiler use the user's home directory to write caches for the system.scm (~/.cache
). This means these files will be created with theroot
user.The bad part is, if
~/.cache/guix
or even just~/.cache
don't already exist, these directories will also be created with theroot
user and be owned and only writeable by them. As you can imagine, this becomes a problem.EDIT: Try
find ~ -user root
to list all root-owned files to see what I mean :PIt took me quite a while to understand why
guile
would complain all the time when trying to run Scheme scripts, and I just realized it's because it was unable to write the compiled code to the cache. Luckily I haven't had problems with other programs, but I think that's because the~/.cache
directory is created by default (or I've just been really lucky).So, I suggest you stop using it in examples and in your own code too. This is not the first time
sudo -E
has caused me problems, so I really discourage it. (sudo -E $EDITOR
is also a common use, and it's just as harmful! If your editor downloads any plugins or creates any folders inside$HOME
, they will have the exact same problem as the Guile compiler above).Again, thank you for this resource. The use of org-mode (or whatever other emacs magic is involved :s) to make the self-describing files in a nice format is amazing and very easy to follow.
The text was updated successfully, but these errors were encountered: