Is there a simple way to tell if I'm using ecryptfs on my home directory? I tried running the ecryptfs-migrate-home
script a while ago, and it failed part way through. I assumed that it went back to using my old plain, unencrypted home, but I just noticed that /home/.ecryptfs/naught10t/.Private exists, and has lots of files in it...
Asked
Active
Viewed 5,086 times
13

naught101
- 1,582
3 Answers
20
If ecryptfs is being used, your home folder will be mounted. You can check if it is with this command:
df -T
When I run it, I get this result:
kalle@Kalle-PC:~$ df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/sdc1 ext4 115376648 9002220 100513568 9% /
udev devtmpfs 2050188 4 2050184 1% /dev
tmpfs tmpfs 824108 1128 822980 1% /run
none tmpfs 5120 0 5120 0% /run/lock
none tmpfs 2060264 900 2059364 1% /run/shm
/dev/sdb1 fuseblk 1953512444 1183183452 770328992 61% /media/x
/dev/sda2 ext4 861466440 138769200 678937216 17% /home
/home/kalle/.Private ecryptfs 861466440 138769200 678937216 17% /home/kalle
I have several drives on my system, but the last line is the relevant one. It shows that /home/kalle/.Private of type ecryptfs is mounted to /home/kalle, which is my home directory.
Run df -T
on your system and check the results.

Kalle Elmér
- 8,288
1
Type the command mount
into a terminal. This will list devices and their filesystem. Look for ecryptfs
.
-
1While I understand what you're getting at, this answer would be useless for a beginner. – naught101 Sep 24 '12 at 00:23
-
For beginners, run this: echo "Your home directory is $( mount | grep ecryptfs > /dev/null || echo 'not ' )encrypted." – sondra.kinsey Aug 30 '17 at 16:15
-
However, @Kalle Elmér's answer is more future-proof, as it will reveal other programs which mount your home directory rather than it being a normal directory. – sondra.kinsey Aug 30 '17 at 16:18
0
I wanted to use fallocate in a script and found that I am still using ecryptfs on one of the machines I tested which failed, telling me that fallocate is not supported.
The code I implemented and shellchecked to detect this condition and use dd instead is this:
if $(grep -q -e "^${HOME}/.Private ${HOME} ecryptfs" "/proc/mounts"); then
echo 'eCryptfs detected!';
fi

LiveWireBT
- 28,763
/home/me/.Private
, then/home/me/
should be empty? (except for the.Private
folder?) – naught101 Sep 24 '12 at 00:24If your files are still there, however, it would mean that the contents of your home were duplicated to ecryptfs, but not deleted from their original location.
What is the case?
– Kalle Elmér Sep 24 '12 at 13:42