Set the default open() O_CREAT file permissions to 666#736
Set the default open() O_CREAT file permissions to 666#736BillyONeal merged 1 commit intomicrosoft:masterfrom
Conversation
|
This seems like it would be an unsafe default. When wget downloads a file, it certainly doesn't give write access to the universe; why should this? |
|
This won't give write access to the universe on most systems. As stated above, on practically all unix systems the "umask" will be set to something like From wikipedia "umask":
Also see this StackOverflow answer:
In fact wget sets exactly this default and I argue that this should as well. See for example wget's utils.cc : line 813: fd = open (fname, flags, 0666); |
This changes the default file creation permissions on unix to 666. This allows for more control by system administrators using
umask. Along with a default umask of022(on most systems) files would be created with permissions0644.