You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golan...@googlegroups.com
Hi!
I test and try a whole load of Go tools and libraries, and as a result,
my ~go/pkg dir quickly grows. While I'd love some kind of automatic
expiry for that cache, I am fine with just occasionally running rm-rf on
that dir myself.
... except it doesn't work. For some unclear reason, some of those
directories and files are created with readonly permissions:
Needless to say, this is annoying, and while I can 'fix' it by doing a
find|xargs chmod, I'd rather the permissions weren't this restrictive in
the first place.
So I wonder why they look like that. Is it a umask issue? Or something
in git's config? Or is Go at fault here?
Best,
Tobias
Ian Lance Taylor
unread,
May 10, 2024, 4:26:24 PM5/10/24
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golan...@googlegroups.com
This is a choice made by Go. You can override with the -modcacherw
option to "go build", "go test", "go install", and similar code. You
can make that option the default by setting GOFLAGS in the environment
or via "go env GOFLAGS=...".
You can also remove the module cache using "go clean -modcache".
Ian
Tobias Klausmann
unread,
May 10, 2024, 5:11:56 PM5/10/24
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golan...@googlegroups.com
Hi!
On Fri, 10 May 2024, Ian Lance Taylor wrote:
> This is a choice made by Go. You can override with the -modcacherw
> option to "go build", "go test", "go install", and similar code. You
> can make that option the default by setting GOFLAGS in the environment
> or via "go env GOFLAGS=...".
>
> You can also remove the module cache using "go clean -modcache".
Thanks for the explanation! What is the rationale for the read-only
perms, though?
Best,
Tobias
Ian Lance Taylor
unread,
May 10, 2024, 5:32:55 PM5/10/24
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golan...@googlegroups.com
It's essential for supply chain security that builds with a specific
version of a package always use the same code. It's natural for
debugging for people to look at the source code in the module cache.
Making that source code read-only removes a class of accidents in
which somebody looking at the code in the module cache modifies it,
without necessarily realizing that that will affect all builds on that
machine that use that package.