-m, --mirror=user1:user2:..., -o mirror=...

Takes a comma- or colon-separated list of users who will see themselves as the owners of all files. Users who are not listed here will still be able to access the mount if the permissions otherwise allow them to.

You can also give a group name prefixed with an ’@’ to mirror all members of a group. This will not change which group the files are shown to have.

I'm suspicious how this works with the Linux kernel cache of file metadata (VFS inode cache)...

Is it possible to see the "wrong" owner if you are unlucky? Or does bindfs correctly use some feature of the Linux kernel FUSE implementation, to force the VFS inode cache to refetch the inode ownership details on every userspace access?

The FUSE kernel refreshes inode attributes from the userspace FUSE process once every 3 seconds by default. This can be tuned through the fuse.attr.timeout parameter in the fuse.conf file. The fuse.attr.timeout parameter specifies the interval of time at which to refresh the inode attributes in kernel and can be used to minimize the amount of time it takes to refresh the cache.



The timeout in seconds for which file/directory attributes are cached. The default is 1.0 second.


1 Answer 1


bindfs does handle this issue.


/* We need to disable the attribute cache whenever two users
   can see different attributes. For now, only mirroring can do that. */
if (is_mirroring_enabled()) {
    fuse_opt_add_arg(&args, "-oattr_timeout=0");

I am not certain how exactly attr_timeout translates into the behaviour of the kernel inode cache. But I suppose a similar question would apply e.g. to any network filesystem, which would want to be able to revalidate the inode details in case they were changed on the file server.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .