os: document Chown behavior when uid == -1 or gid == -1 #24710
Labels
Documentation
Issues describing a change to documentation.
FrozenDueToAge
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
What version of Go are you using (
go version
)?https://golang.org/pkg/os/
Does this issue reproduce with the latest release?
Yes, checked tip docs as well: https://tip.golang.org/pkg/os/ (Build version devel +d3026dd30a Thu Apr 5 18:54:31 2018 +0000.)
What did you do?
I read some code like
os.Chown(path, -1, gid)
and was unsure what uid == -1 meant, so I checked the docs.What did you expect to see?
Explanation of behavior when uid == -1 (for any of
Chown
,Lchown
, and(*File).Chown
).What did you see instead?
I had to trace through the
os
code to learn that it callssyscall.Chown
, then I had to checkman 2 chown
to learn:I also consulted http://pubs.opengroup.org/onlinepubs/9699919799/functions/chown.html which states
so I believe this behavior should be okay to add to Godoc.
The text was updated successfully, but these errors were encountered: