I would like to install Rust via rustup on AWS Ubuntu, and I'd like sudo cargo
to work. The system has a quirk that it wants SSH to log in via a regular user and then sudo
to perform any actions.
If I install rustup as recommended curl | sh
, then it's installed for the current user, and is not available in scripts ran via sudo
.
If I install it via curl | sudo sh
, then it creates unusable installation (warning: $HOME differs from euid-obtained home directory: you may be using sudo
).
I need to use sudo cargo
, because I'm building code that is not supposed to be world-readable, but I don't have patience to set up users/groups precisely