fuser
fuser copied to clipboard
umask always zero?
I checked the calls I'm getting in mkdir and create, and it seems that the calling process's umask is already automatically applied to the mode argument and the additional umask argument is always set to zero. Is this intentional? What is the umask argument supposed to be used for?
Fuser: 0.12.0
Filesystem setup: fuser::spawn_mount2 with empty set of options
Looking at fuse configuration, it looks like this is configurable behaviour since ~ABI 7.12: The default seems to be that the kernel applies the umask for you, probably giving you a zero for the umask to ensure compatibility.
However, if you set FUSE_DONT_MASK during filesystem init (https://github.com/libfuse/libfuse/blob/9ca35f454f61df81af9bcb315908819fd2100696/include/fuse_kernel.h#L335, https://github.com/cberner/fuser/blob/8b390279a5da98df3f91b69aee8ef20de793a2fa/src/ll/fuse_abi.rs#L196), the umask should not be applied automatically by the kernel, and may thus be non-zero (note that a zero umask may be used by the process as well).