changed the title from Bug : The inodes entries cached by fuse are not refreshed upon returning from setattr(). to Cached directory entry permissions are only checked for first accessing userFeb 1, 2016
changed the title from Cached directory entry permissions are only checked for first accessing user to Without `default_permissions`, cached permissions are only checked on first accessMar 1, 2016
This patch solves a long standing bug.
"([bug #15](libfuse/libfuse#15)): if the
`default_permissions` mount option is not used, the results of the
first permission check performed by the file system for a directory
entry will be re-used for subsequent accesses as long as the inode of
the accessed entry is present in the kernel cache - even if the
permissions have since changed, and even if the subsequent access is
made by a different user.
This bug needs to be fixed in the Linux kernel and has been known
since 2006 but unfortunately no fix has been applied yet. If you
depend on correct permission handling for FUSE file systems, the only
workaround is to use `default_permissions` (which does not currently
support ACLs), or to completely disable caching of directory entry
attributes. Alternatively, the severity of the bug can be somewhat
reduced by not using the `allow_other` mount option."
This patch introduce a callback which the user space implementation can use
to invalidate the cached entries of a parent directory, for example when
the execute permissions are revoked and force real lookup.
Signed-off-by: Ashish Sangwan <firstname.lastname@example.org>