I am trying to install nightly rust on a new computer running ubuntu, and all the commands (rustc, cargo, rustup) are working, but only if I do not run them as root. For example, if I want to build a program without using sudo, it will say:
Ah, It turns out that the file was locked because I pulled changes in the project from gitlab, which locks the files, so I unlocked them using chmod, and now I don't need root.