← Back to team overview

ecryptfs team mailing list archive

[Bug 390833] Re: du reports newly created files on ecryptfs as empty

 

I just wanted to add to this discussion/report my own experience with
this bug. It seems that the issue occurs not just between sync, but even
after a reboot/remount.

I have an ecryptfs-mounted home directory, within which everything
appears to be 0 bytes. However, I *can* read the files and they appear
to have valid contents, it's just that they're misreported by "du" etc

However, as a test I did a similar "dd" from /dev/zero and created a
file of approx 2mb. Even after rebooting the machine and remounting the
cryptfs partition, "du" still displays the filesize as 0 bytes. As such,
it would appear that this issue isn't related to just new files still in
memory, as it was long since flushed to disk.

The machine I'm testing on at this particular moment has a kernel that's
a few versions behind the latest, so I'll re-post here if the bug goes
away after I finish compiling/upgrading.


Cheers,

Tyler

-- 
du reports newly created files on ecryptfs as empty
https://bugs.launchpad.net/bugs/390833
You received this bug notification because you are a member of eCryptfs,
which is subscribed to ecryptfs-utils in ubuntu.

Status in eCryptfs - Enterprise Cryptographic Filesystem: Invalid
Status in “ecryptfs-utils” package in Ubuntu: Invalid

Bug description:
I'm using an encrypted home directory on Ubuntu Jaunty. When I create a new file in my home directory or copy and existing file/folder, du shows its size as zero bytes:

das@serenity ~ > dd if=/dev/zero of=test bs=1024 count=1024
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 0.114302 s, 9.2 MB/s
das@serenity ~ > du test
0	test
das@serenity ~ > ll test
-rw-r--r-- 1 das das 1048576 2009-06-22 22:14 test

du keeps reporting a size of zero bytes until the encrypted directory is remounted. After that, the output seems to be correct.