Comment 0 for bug 911507

Tyler Hicks (tyhicks) wrote :

Empty files left in the lower filesystem cause eCryptfs to return error codes and log error messages when eCryptfs tries to read the metadata. This has been the mode of operation since the beginning of eCryptfs. There is no eCryptfs metadata available, so it seemed appropriate to refuse to open the file.

However, more and more users are having trouble with this poor design. It would not be too difficult to convert the empty file into a proper eCryptfs file in the open() path, just as is done in the create() path.

Currently, users see these messages logged to their syslog:

Valid eCryptfs headers not found in file header region or xattr region
Either the lower file is not in a valid eCryptfs format, or the key could not be retrieved. Plaintext passthrough mode is not enabled; returning -EIO

Transparently converting the empty file to an eCryptfs file and successfully completing the open() request will greatly improve usability.