Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os: document that os.CreateTemp uses permissions 0600 #66784

Closed
jech opened this issue Apr 11, 2024 · 2 comments
Closed

os: document that os.CreateTemp uses permissions 0600 #66784

jech opened this issue Apr 11, 2024 · 2 comments
Labels
Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@jech
Copy link

jech commented Apr 11, 2024

Go version

go version go1.22.1 linux/amd64

Output of go env in your module/workspace:

Irrelevant, but happy to provide if required.

What did you do?

I checked the documentation for os.CreateTemp. I couldn't find what permissions were used for the file. I had to check the source in order to find out that it's 0600 (and rightly so).

What did you see happen?

go doc os.CreateTemp | grep -i permission

What did you expect to see?

An indication that the file is not readable by other users, (and that it's guaranteed to remain that way in future Go versions).

@gopherbot
Copy link

Change https://go.dev/cl/578395 mentions this issue: os: document file mode of temporary files

@cagedmantis cagedmantis added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 12, 2024
@cagedmantis cagedmantis modified the milestones: Backlog, Go1.23 Apr 12, 2024
@cagedmantis cagedmantis changed the title os: please document that os.CreateTemp uses permissions 0600 os: document that os.CreateTemp uses permissions 0600 Apr 12, 2024
@cagedmantis
Copy link
Contributor

Tagging owners even though @ianlancetaylor mailed a CL.

@rsc @robpike @ianlancetaylor @bradfitz @griesemer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants