os: chmod could report if mode bits that are not in use are provided #44575
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using linux/amd64
What did you expect to see?
A directory with drwxrwxrwt
What did you see instead?
drwxrwxrwx
Incorrect permission bit (missing t)
Proposal
Chmod could return an error, if bits are supplied that are not in use.
This could point users to the documentation that alternatively could be improved (currently an iota source copy) and also protect users to a degree, that fail to use an octal literal notation e.g. 1777 like the chmod command line binary instead of 01777
I assume to some degree that os.chmod could return an error upon use of certain or ideally, all unused bits. Those bits could be reclaimed if needed in the future and consideration of user behaviour, considered before new bit assignments?
The text was updated successfully, but these errors were encountered: