diff --git a/src/wasm/nxt_rt_wasmtime.c b/src/wasm/nxt_rt_wasmtime.c index bf0b0a0f9..f8ad83c2f 100644 --- a/src/wasm/nxt_rt_wasmtime.c +++ b/src/wasm/nxt_rt_wasmtime.c @@ -281,7 +281,9 @@ nxt_wasmtime_wasi_init(const nxt_wasm_ctx_t *ctx) wasi_config_inherit_stderr(wasi_config); for (dir = ctx->dirs; dir != NULL && *dir != NULL; dir++) { - wasi_config_preopen_dir(wasi_config, *dir, *dir); + wasi_config_preopen_dir(wasi_config, *dir, *dir, + WASMTIME_WASI_DIR_PERMS_READ, + WASMTIME_WASI_FILE_PERMS_READ); } error = wasmtime_context_set_wasi(rt_ctx->ctx, wasi_config);