-
-
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
rm doesn't handly restrictive permissions #47650
Labels
bug
Indicates an unexpected problem or unintended behavior
filesystem
Underlying file system and functions that use it
Comments
maleadt
added a commit
to maleadt/Sandbox.jl
that referenced
this issue
Nov 21, 2022
maleadt
added a commit
to maleadt/Sandbox.jl
that referenced
this issue
Nov 21, 2022
maleadt
added a commit
to maleadt/Sandbox.jl
that referenced
this issue
Nov 21, 2022
maleadt
added a commit
to maleadt/Sandbox.jl
that referenced
this issue
Nov 21, 2022
Fixed now. FWIW, there's even corner cases that
|
Another case: julia> mkpath("/tmp/work/work")
"/tmp/work/work"
julia> touch("/tmp/work/work/work")
"/tmp/work/work/work"
julia> chmod("/tmp/work/work", 0o200)
"/tmp/work/work"
julia> rm("/tmp/work"; recursive=true)
ERROR: IOError: rm("/tmp/work/work"): directory not empty (ENOTEMPTY)
Stacktrace:
[1] uv_error
@ ./libuv.jl:100 [inlined]
[2] rm(path::String; force::Bool, recursive::Bool)
@ Base.Filesystem ./file.jl:306
[3] rm(path::String; force::Bool, recursive::Bool)
@ Base.Filesystem ./file.jl:294
[4] top-level scope
@ REPL[22]:1
shell> rm -rf /tmp/work
rm: cannot remove '/tmp/work/work': Permission denied Since |
Yeah, when dealing with overlay mounts, using chmod is what I typically do. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Indicates an unexpected problem or unintended behavior
filesystem
Underlying file system and functions that use it
MWE:
... this throws:
... whereas
rm
just works:Setting
force=true
"fixes" this, but that shouldn't be required (asrm
doesn't need it), and also doesn't work whenrm
is invoked from, say, themktempdir
clean-up handle:Files like this do exist in the wild;
work/work
here is similar to what overlayfs mounts create (albeit with an even more restrictive chmod of 000, which I didn't use here because it makesrm
prompt for confirmation).The text was updated successfully, but these errors were encountered: