-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
iswritable(::FileName) is useless and broken #7385
Comments
See also previous discussion on julia-users |
@ivarne I opened that discussion and reported the issue here. Thanks for the cross-reference. |
The documentation seems to be wrong. It says this refers to the current user, but it actually refers to any user. |
This does not fully work on Windows, but is no worse than the current situation
This does not fully work on Windows, but is no worse than the current situation
fixed in a487dcf |
This does not fully work on Windows (no support for ACLs), but is no worse than the current situation
Nice, @ihnorton! |
I guess we'll have to do it the bit-fiddly way then. |
I don't get it --- is this another one of those unix things that just inexplicably doesn't work? |
Ref: #7563 |
PR was #7418 for Isiah's attempt (since github only seems to have linked the commit sha1 from here) I think we should just delete this functions. Since, as the man page says: "Warning: Using access() to check if a user is authorized to, for example, open a file before actually doing so using open(2) creates a security hole, because the user might exploit the short time interval between checking and opening the file to manipulate it" |
There is probably a bug is the
iswritable
function. Watch this:All this is run from the REPL, with julia launched as normal user, so there is no write permission at all in the root folder /. I would expect
iswritable
to return false in this case.Running Julia v"0.3.0-prerelease+3461" on Ubuntu 14.04.
The text was updated successfully, but these errors were encountered: