trapexit / mergerfs

a featureful union filesystem
http://spawn.link
Other
4.21k stars 170 forks source link

mergerfs - fuse `allow_other` and security #1330

Closed tjay closed 5 months ago

tjay commented 5 months ago

Hi, thank you for this great project @trapexit, I would like clarity regarding the libfuse annotations for the allow_other option ( https://github.com/libfuse/libfuse/blob/master/README.md?plain=1#L117-L137 ). especially since it is now automatically activated.

If I understand libfuse's annotations correctly, mergerfs should also be affected. Is that correct?

trapexit commented 5 months ago

I'm not sure what you are asking. Clarify what exactly?

tjay commented 5 months ago

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

If mergerfs behaves like that then it would be problematic, right? Does a user have to pay attention when a volume is configured for multi-user access?

trapexit commented 5 months ago

It doesn't. It is explained in the docs.

mergerfs uses default permissions open and always changes to the user doing the request so it doesn't matter if fuse passed through the request. it would act appropriately when it changes credentials.