[Bug 218101] [fuse] [request] support entry_timeout / attr_timeout

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Aug 11 21:26:22 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218101

--- Comment #1 from Ben RUBSON <ben.rubson at gmail.com> ---
Here is a test case for this request report :

# Create a Fuse EncFS in reverse mode (will give an encrypted view of the plain
folder) :
plain=/tmp/encfs_test/plain
ciphr=/tmp/encfs_test/ciphr
mkdir -p $plain $ciphr
encfs --extpass="echo test" --standard $plain $ciphr --reverse

# Update a file in the plain folder
while [ 1 ]; do echo >>$plain/file ; sleep 0.5; done

# Monitor the files in the encrypted view :
while [ 1 ]; do clear; stat $ciphr/*; sleep 0.5; done

As you can see, the timestamps correctly get updated, but not the sizes.

It's then dangerous because if you open the encrypted file
(using dd for example, dd if=$ciphr/... of=/dev/null),
it will then be truncated (!) to the size being displayed by stat,
whereas it was in reality much bigger, as its plain version was growing.

I found fuse sysctls, some are cache related, but no benefit.

Adding "-o attr_timeout=0 -o entry_timeout=0" to the encfs command
in Linux makes this to work.

Thank you !

Ben

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-fs mailing list