VS code doesn't open any more
Seems like you don't own root.
Try running:
sudo chown root:root /
Unable to install Go packages
godoc
seems to be an exception to the general go get
practice, because it installs to the go installation ($GOROOT/bin
) instead of $GOPATH
. So, if you really need to update godoc
(why?), what you need to do is:
- Log in as root (or
su
, orsudo su
, or ...) - Set
$GOPATH
to your normal user$GOPATH
("/home/utkbansal/go"
) - Update
godoc
, usinggo get -u golang.org/x/tools/cmd/godoc
, or all tools - Set the appropriate permissions on for your
$GOPATH
, i.e.chown -R utkbansal:utkbansal $GOPATH
(still as root)
That should work I guess. BUT: Why would you want to update godoc
? If you just want one specific tool that is not pre-installed, you should be able to go get
it without root privileges.
Git can overwrites files owned by root (no sudo)
git checkout
only does one thing with the existing file: it removes it, for which it only requires write permissions for the current directory.
After the file is remove, Git creates a new file owned by the current user and its default group, with 755 permissions if the tracked file is executable, 644 otherwise.
Related Topics
Qimage to Cv::Mat Convertion Strange Behaviour
History Command Works in a Terminal, But Doesn't When Written as a Bash Script
Why Does '/Proc/Meminfo' Show 32Gb When Aws Instance Has Only 16Gb
Is the Order of Iteration in Bash for Loop Guaranteed
After Changing /Etc/Profile, What Do I Have to Do to Reset My Shell
What Happens If You Mount to a Non-Empty Mount Point with Fuse
Can't Remove a Directory in Unix
Integrate Emacs Copy/Paste with System Copy/Paste
How to Create Web Based Terminal Using Xterm.Js to Ssh into a System on Local Network
How to Change(Hide) the Nginx Server Signature
Installing Ghc Binaries on Linux (Can't Find Libgmp.So)
How to Redirect Cron Job Output to Stdout
What Is the Pid in the Host, of a Process Running Inside a Docker Container
How to Grep a String After a Specified Line Number