Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customize the permissions of the VFS mountpoint directory, #148

Open
zyfjeff opened this issue Aug 15, 2023 · 1 comment
Open

Customize the permissions of the VFS mountpoint directory, #148

zyfjeff opened this issue Aug 15, 2023 · 1 comment

Comments

@zyfjeff
Copy link
Contributor

zyfjeff commented Aug 15, 2023

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
Copy link
Contributor Author

zyfjeff commented Aug 15, 2023

@bergwolf @jiangliu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant