You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given that Linux's default umask is 0022, the resulting Linux permissions match Julia. But if the user has a more permissible umask set, then Julia will not match Linux:
shell> umask 0000
julia> open("testjl", "w") do f
println(f, "hello")
end
shell> echo "hello" > test
shell> ls -l test*
-rw-r--r-- 1 username group 6 May 19 19:01 testjl
-rw-rw-r-- 1 username group 6 May 19 19:01 test
On a multi-user system, teams may use umask to ensure that files are appropriately accessible. My background here is that I created a file in a shared data directory using writetable; my coworker was unable to overwrite it because the file did not have group write permissions even though in other usage, the value of umask we have set would have allowed that. So my only recourse would be to continuously do chmod on the file.
So I'm wondering why Julia doesn't act like Linux here and set the same default file creation mode.
The default file-creation mode using Julia's
open
is to give the fileu=rw, g=w, o=w
permissions (src/support/ios.c):On the other hand, Linux's default (or "usual case") seems to be
u=rw, g=rw, o=rw
:Given that Linux's default umask is 0022, the resulting Linux permissions match Julia. But if the user has a more permissible umask set, then Julia will not match Linux:
On a multi-user system, teams may use umask to ensure that files are appropriately accessible. My background here is that I created a file in a shared data directory using
writetable
; my coworker was unable to overwrite it because the file did not have group write permissions even though in other usage, the value ofumask
we have set would have allowed that. So my only recourse would be to continuously dochmod
on the file.So I'm wondering why Julia doesn't act like Linux here and set the same default file creation mode.
(See also #16237 for previous discussion.)
The text was updated successfully, but these errors were encountered: