2 ms·
Well, as I said, you can pass pretty much whatever, none of those bits (except the owner-writeable bit) do anything because Windows uses a fundamentally differe
by Joker_vD 4y ago
Well, as I said, you can pass pretty much whatever, none of those bits (except the owner-writeable bit) do anything because Windows uses a fundamentally different model of access control. And no, Golang's os.Create() passes 0666 to os.OpenFile [0], just as fopen(3) passes 0666 to creat(2) [1] on Linux as well.
[0] https://cs.opensource.google/go/go/+/refs/tags/go1.19:src/os/file.go;drc=b72a6a7b868deb5b671020c08fbf8d61ad8803d4;l=326 https://cs.opensource.google/go/go/+/refs/tags/go1.19:src/os...
[1] https://linux.die.net/man/3/fopen https://linux.die.net/man/3/fopen