Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to fix "go not root owned"

I installed go on ubuntu 16.04 from the archive and tried to test my installation by issuing the command go on my terminal. It keeps prompting me / not root-owned 1000:0.

I installed go on /usr/local folder and also included it into my path as instructed on the official golang installation. I removed go and tried to install it again, but found the same result. It sounds more of a linux root permission issue, but I have no clue how to fix it. I tried other commands that I installed from archive and they work perfectly fine. Any kind of help would be appreciated.

like image 928
eth crypt Avatar asked Mar 27 '18 06:03

eth crypt


2 Answers

It seems to complain that the system root directory / has the wrong owner. This is a security problem because you don't want to have regular users changing system files at will. It looks like you changed this on purpose at some point in the past; change it back, or reinstall your system if you have wrecked more permissions than just this one.

sudo chown root /

For the record, the proper way to give yourself limited system access is to use sudo. Add yourself to sudoers (usually this is already set up by the OS installer on any reasonably consumer-oriented Linux distro) and when you need privileges for something, run that command with sudo.

like image 103
tripleee Avatar answered Nov 12 '22 18:11

tripleee


Simple, in the command line:

sudo chown root:root /
like image 35
2 revs, 2 users 67% Avatar answered Nov 12 '22 17:11

2 revs, 2 users 67%