You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is because FUSE passes the mode as a u32, which is because the mode_t in chmod(2) is actually a 32-bit integer on some platforms (Linux at least). Not all the bits have a well-defined meaning, which is why FileAttr only takes a u16, but I guess nothing stops you from doing chmod(path, 0x10000); on Linux.
So I did some experiments, and found something interesting. On Linux, while you can pass any 32-bit value to chmod(), at some level it gets a mask applied and the maximum value fuse_mt sees is 0x8FFF. I'm not sure if this is the kernel or FUSE doing this.
So it might make sense to change the type after all.
The
chmod
function passes the mode as au32
, but theperm
field ofFileAttr
is au16
The text was updated successfully, but these errors were encountered: