Score:0

How to fix permissions when using "ecryptfs' command

gl flag

I am trying to recover an encrypted home directory from an Ubuntu installation hard drive, attached as an external hard drive to my current Ubuntu system.

I opened a terminal and launched some commands:

adi@adi-1:~$ sudo fdisk -l  
[sudo] password for adi:

Disk /dev/sdb: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors  
Disk model: WDC WD20EARS-00M  
Units: sectors of 1 * 512 = 512 bytes  
Sector size (logical/physical): 512 bytes / 4096 bytes  
I/O size (minimum/optimal): 4096 bytes / 4096 bytes  
Disklabel type: dos  
Disk identifier: 0x00080dae

Device Boot Start End Sectors Size Id Type  
/dev/sdb1 * 2048 1945403391 1945401344 927.7G 83 Linux  
/dev/sdb2 1945405438 1953523711 8118274 3.9G 5 Extended  
/dev/sdb5 1945405440 1953523711 8118272 3.9G 82 Linux swap / Solaris  

Partition 2 does not start on physical sector boundary.

adi@adi-1:~$ sudo ecryptfs-recover-private  
[sudo] password for adi:  
INFO: Searching for encrypted private directories (this might take a while)...  
find: ‘/run/user/1000/doc’: Permission denied  
find: ‘/run/user/1000/gvfs’: Permission denied  
adi@adi-1:~$  
    
adi@adi-1:~$ sudo ecryptfs-mount-private  
[sudo] password for adi:  
ERROR: Encrypted private directory is not setup properly  
adi@adi-1:~$  

adi@adi-1:/media/adi/d2bc773c-93e3-43e2-b1bc-e2d2430030cb/home$ sudo ecryptfs-recover-private  
INFO: Searching for encrypted private directories (this might take a while)...  
find: ‘/run/user/1000/gvfs’: Permission denied  
adi@adi-1:/media/adi/d2bc773c-93e3-43e2-b1bc-e2d2430030cb/home$  

adi@adi-1:~$ sudo ecryptfs-recover-private /media/adi/d2bc773c-93e3-43e2-b1bc-e2d2430030cb/home/adrian/.Private  
INFO: Searching for encrypted private directories (this might take a while)...  
find: ‘/run/user/1000/gvfs’: Permission denied  
find: ‘/run/user/1001/doc’: Permission denied  
find: ‘/run/user/1001/gvfs’: Permission denied  

adi@adi-1:/media/adi/d2bc773c-93e3-43e2-b1bc-e2d2430030cb/home$ sudo ecryptfs-mount-private  
[sudo] password for adi:  
ERROR: Encrypted private directory is not setup properly  
adi@adi-1:/media/adi/d2bc773c-93e3-43e2-b1bc-e2d2430030cb/home$  

Apparently I am dealing with a permission issue. Can some one tell me what have I done wrong and how to decrypt the home folder.

Thanks.

hr flag
Your encrypted private directory isn't going to be on the live system's `/run` filesystem, so the permission issue is moot in this case I think
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.