Open Userzxcvbvnm opened 1 month ago
I figured out the difference in our setup. With wasix-libc
, the provided test works, but using wasi-libc
it does not.
This may be related to https://github.com/wasmerio/wasmer/issues/4245
We checked different OS permission with different openstyle, and found that wasmer is different from other WASM runtimes, including wasmtime, WAMR and WasmEdge. The behavior of other WASM runtimes is as expected. There are two kinds of bugs in wasmer: (FILENAME->0600 means change the permission of a file to 0600, rw------- DIRNAME->0700 means change the permission of a directory to 0700, rwx------ FILENAME->O_RDONLY means open the file with O_RDONLY DIRNAME->O_RDONLY | O_DIRECTORY means open the directory with O_RDONLY | O_DIRECTORY)
DIRNAME->0700 DIRNAME->O_RDONLY | O_DIRECTORY
FILENAME->0600 FILENAME->O_WRONLY
FILENAME->0200 FILENAME->O_WRONLY | O_APPEND
FILENAME->0600 FILENAME->O_WRONLY | O_TRUNC | O_CREAT
FILENAME->0600 FILENAME->O_RDWR | O_CREAT
FILENAME->0600 FILENAME->O_RDWR | O_TRUNC | O_CREAT
FILENAME->0600 FILENAME->O_WRONLY | O_CREAT
DIRNAME->0500 DIRNAME->O_RDONLY | O_DIRECTORY
DIRNAME->0600 DIRNAME->O_RDONLY | O_DIRECTORY
FILENAME->0600 FILENAME->O_WRONLY | O_TRUNC
FILENAME->0600 FILENAME->O_RDWR
FILENAME->0200 FILENAME->O_WRONLY
FILENAME->0200 FILENAME->O_WRONLY | O_TRUNC | O_CREAT
FILENAME->0600 FILENAME->O_WRONLY | O_APPEND
DIRNAME->0400 DIRNAME->O_RDONLY | O_DIRECTORY
FILENAME->0600 FILENAME->O_RDWR | O_APPEND
FILENAME->0200 FILENAME->O_WRONLY | O_CREAT
FILENAME->0600 FILENAME->O_RDONLY
FILENAME->0200 FILENAME->O_WRONLY | O_TRUNC
FILENAME->0600 FILENAME->O_RDWR | O_TRUNC
FILENAME->0400 FILENAME->O_RDONLY
FILENAME->0400 FILENAME->O_RDWR | O_CREAT
FILENAME->0400 FILENAME->O_WRONLY | O_CREAT
FILENAME->0400 FILENAME->O_RDWR | O_TRUNC | O_CREAT
FILENAME->0200 FILENAME->O_RDWR | O_CREAT
FILENAME->0200 FILENAME->O_RDWR | O_TRUNC | O_CREAT
FILENAME->0400 FILENAME->O_WRONLY | O_TRUNC | O_CREAT
FILENAME->0400 FILENAME->O_RDONLY
DIRNAME->0100 DIRNAME->O_RDONLY | O_DIRECTORY
DIRNAME->0300 DIRNAME->O_RDONLY | O_DIRECTORY
DIRNAME->0200 DIRNAME->O_RDONLY | O_DIRECTORY
This is related to https://github.com/wasmerio/wasmer/issues/4753, which may not be resolved.