I've followed the instructions to use ext4 encryption here:
How to create ext4 encrypted partition on Ubuntu 15.04 with new 4.1 kernel?
Everything works great. But if the files are deciphered for the owning user, then when I log in as a different user, I can see the encrypted files in the clear. The files are world-readable, but the key is only in the keyring of the owning user, so I'm pretty sure this shouldn't be allowed.
The problem may be related to caching of inodes. When I do:
echo 2 > /proc/sys/vm/drop_caches
Then the files are again inaccessible to the second user. But as soon as the first user accesses the files (with the key in session keyring), the files again become visible to the second user.
I must be doing something blatantly wrong, but I'm not sure what.
I'm on kernel 4.4.0-33-generic using pre-release Yakkety Yak (Ubuntu 16.10).