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

Describe change-file-permissions-at in more detail #74

Open
sunfishcode opened this issue Dec 22, 2022 · 1 comment
Open

Describe change-file-permissions-at in more detail #74

sunfishcode opened this issue Dec 22, 2022 · 1 comment

Comments

@sunfishcode
Copy link
Member

change-file-permissions-at is vague about what it precisely does. This is necessary to some degree, due to differences between host operating systems. But it should at least say what it does on Unix and probably also Windows.

My rough idea when I proposed this function was that on Unix it would follow the user's umask. The umask is commonly 02, which means readable would be world-readable, writeable would be user/group-writeable, and executable would be world-executable.

@codefromthecrypt
Copy link

codefromthecrypt commented Feb 17, 2023

It seems the mode can't be read back by any of the functions defined here (e.g. not by stat), which makes less edge cases to describe for read-back.

I would recommend saying somehow, that when embedded in windows, you can't change the permissions of a directory and the execute bit has no meaning in files. Go has similar docs on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants