← Back to team overview

ecryptfs team mailing list archive

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

 

One could argue that the current "du" output is correct because the
ecryptfs really requires zero bytes for storing the files (because it's
using the underlying file system for actual storage).

However, that prevents users from from using "du" or any similar tool
for figuring out which files and/or directories take the most disk
space. Because the encrypted files are much bigger than apparent size
especially for small apparent file sizes it would make sense to allow
normal user space programs to compute the real disk space used.

Perhaps one should figure out how "du" is computing its total count for
real disk space taken and then implement required features for ecryptfs
to correctly result in real disk space used in the underlying file
system.

-- 
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: In Progress
Status in “ecryptfs-utils” package in Ubuntu: Triaged

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.