X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/270869139db617e29a35bb9ded41087bb702f9ac..b297c96099a08a9f2b7e20e80a8f43515fabd714:/lunaix-os/kernel/fs/twifs/twifs.c?ds=inline diff --git a/lunaix-os/kernel/fs/twifs/twifs.c b/lunaix-os/kernel/fs/twifs/twifs.c index 8f4ed8d..3679ee1 100644 --- a/lunaix-os/kernel/fs/twifs/twifs.c +++ b/lunaix-os/kernel/fs/twifs/twifs.c @@ -18,7 +18,7 @@ #include #include -#include +#include static struct twifs_node* fs_root; @@ -58,6 +58,13 @@ __twifs_init_inode(struct v_superblock* vsb, struct v_inode* inode) { inode->ops = (struct v_inode_ops*)&twifs_inode_ops; inode->default_fops = (struct v_file_ops*)&twifs_file_ops; + + + // we set default access right to be 0660. + // TODO need a way to allow this to be changed + + fsapi_inode_setaccess(inode, FSACL_u(R, W, _) | FSACL_g(R, W, _)); + fsapi_inode_setowner(inode, 0, 0); } int