MendyBerger opened issue #12912:
Overview
As far as I can tell, wasmtime never checks
descriptor-flags.mutate-directory.Also, wasmtime seems to be passing down
mutate-directoryinopen-ateven when the caller/guest doesn't ask for it.See line 1054 where the parent's permissions are just passed down:
https://github.com/bytecodealliance/wasmtime/blob/33e8b3d955697587b23cf39d87fbcbdb4d26b0c9/crates/wasi/src/filesystem.rs#L1052-L1058Expected Results
mutate-directoryshould be required when editing directories, and should not be passed down from the parent automatically.Actual Results
mutate-directoryis ignored, and is passed down from the parent automatically.
MendyBerger added the bug label to Issue #12912.
alexcrichton removed the bug label from Issue #12912.
alexcrichton added the wasi:impl label to Issue #12912.
alexcrichton commented on issue #12912:
I mentioned a bit of this on Zulip as well, but I suspect this is a mixture of being historically ambitious about what would be done coupled with this hasn't really aged well coupled with a lack of tests. I think it's reasonable to tweak behavior here as necessary and avoid taking Wasmtime as the source of truth. Would you be up for sending a PR to adjust the aspects you feel need changing?
MendyBerger commented on issue #12912:
Sure, will take a stab at it
Last updated: Apr 12 2026 at 23:10 UTC