使用“ecryptfs”命令时如何修复权限

使用“ecryptfs”命令时如何修复权限

我正在尝试从 Ubuntu 安装硬盘驱动器恢复加密的主目录,该硬盘驱动器作为外部硬盘驱动器连接到我当前的 Ubuntu 系统。

我打开了一个终端并启动了一些命令:

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$  

显然我正在处理权限问题。有人能告诉我我做错了什么以及如何解密主文件夹吗?

谢谢。

相关内容