0

I have unencrypted files in my /home/user dir (likely fallout from moving my home dir to a different partition).

/dev/sda1             440G  137G  282G  33% /home
/home/user/.Private  440G  137G  282G  33% /home/user

If I ls /home/user while logged on as a different user, I see older contents of that dir since the encrypted file isn't mounted.

Do I need those files? And if not, what is a safe way to delete them?

1 Answer 1

0

Looking at the unmounted encrypted home directory of a non-logged-in user, I see some unencrypted files (well they're really directories and links):

$ /bin/ls -la /home/walt
total 12
dr-x------  3 w3   walt 4096 Apr  9 22:12 .
drwxr-xr-x 13 root root 4096 Sep  1  2015 ..
lrwxrwxrwx  1 walt walt   56 Oct 22  2011 Access-Your-Private-Data.desktop -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.desktop
drwx------  7 walt walt 4096 Jan 16  2013 .cache
lrwxrwxrwx  1 walt walt   30 Oct 22  2011 .ecryptfs -> /home/.ecryptfs/walt/.ecryptfs
lrwxrwxrwx  1 walt walt   29 Oct 22  2011 .Private -> /home/.ecryptfs/walt/.Private
lrwxrwxrwx  1 walt walt   52 Oct 22  2011 README.txt -> /usr/share/ecryptfs-utils/ecryptfs-mount-private.txt

You don't need any other files. You could delete the files with something like find /home/user -maxdepth 1 \( \! -type l -a -type d \) -exec echo rm {} \;, remove the echo when you are thrilled with the results of the find

1
  • While logged in as the user in question, I did mount --bind /home/ /mnt/. That allowed me to see the files underneath /home/user. I deleted a file from /mnt/user and saw that the file in /home/user was untouched. So at least some of those files are "old" or "outside" my true, encrypted home dir and can be deleted. It's not clear to me which files you're saying are needed and should not be deleted. Could you edit your answer to clarify which files should and should not be deleted? I assume the ~/.Private file/link should not be deleted since that's the reference to the encrypted file system.
    – Allen
    Apr 21, 2016 at 4:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .