Skip to content
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

Installing as non-root is confusing when already installed as root #228

Open
jespertheend opened this issue Sep 13, 2022 · 1 comment
Open

Comments

@jespertheend
Copy link

When installing Deno as root (on Ubuntu in my case) you are prompted to add the following to $HOME/.bashrc:

export DENO_INSTALL="/root/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"

However, if you then create a new user and su into that user, these variables are passed along to the new session.
So if you then try to install Deno as a specific user, it will complain:

mkdir: cannot create directory `/root`: Permission denied

It took me quite some time to realise that this was caused by the previously set $DENO_INSTALL variable. I tried to find documentation on installing deno as non-root both in these issues and on https://deno.land/manual but couldn't find anything.
Only after installing on a fresh Linux setup as non-root, without installing as root first, did I realise what was happening.

I think the best place to document this is to make the install script would warn you that $DENO_INSTALL is already set and that you can change it if you wish to install in another location. But otherwise the readme or https://deno.land/manual could also work.

@StrawberryChocolateFudge

I second this.
Do not install Deno as root

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants