fuse-backend-rs icon indicating copy to clipboard operation
fuse-backend-rs copied to clipboard

Customize the permissions of the VFS mountpoint directory,

Open zyfjeff opened this issue 2 years ago • 1 comments

the current permissions of the root directory are a default value, this cannot be customized.

    fn get_entry(&self, ino: u64) -> Entry {
        let mut attr = Attr {
            ..Default::default()
        };
        attr.ino = ino;
        #[cfg(target_os = "linux")]
        {
            attr.mode = libc::S_IFDIR | libc::S_IRWXU | libc::S_IRWXG | libc::S_IRWXO;
        }
        #[cfg(target_os = "macos")]
        {
            attr.mode = (libc::S_IFDIR | libc::S_IRWXU | libc::S_IRWXG | libc::S_IRWXO) as u32;
        }

The root inode of VFS is a pseudo-inode, and its current implementation always returns a default permission that cannot be customized. we want VFS to expose an interface to set the default ATTR

zyfjeff avatar Aug 15 '23 07:08 zyfjeff

@bergwolf @jiangliu

zyfjeff avatar Aug 15 '23 07:08 zyfjeff