kem*_*102 5 encryption data-recovery ecryptfs disk-encryption qnap
在我的 QNAP 设备出现问题之后,我不得不对数据进行大量手动恢复,并且只能获取我的加密数据。
似乎 QNAP 使用 eCryptFS 来做到这一点。我设法设置了密码短语(使用ecryptfs-add-passphrase --fnek)并使用以下命令安装了文件系统:
mount /mnt/md3/.__eN__securedocs/ /mnt/md3/documents/Secure/ -t ecryptfs \
-o rw,ecryptfs_sig=b04b010ba4c32521,ecryptfs_fnek_sig=4f23065f483e5b1c,ecryptfs_unlink_sigs,relatime,ecryptfs_cipher=aes,ecryptfs_key_bytes=32
Run Code Online (Sandbox Code Playgroud)
我可以看到我的文件,但权限处于我以前从未见过的状态,使它们无法与之交互,甚至不足以复制:
[~] # ll /mnt/md3/documents/Secure/
/bin/ls: cannot access /mnt/md3/documents/Secure/battle.net.txt: No such file or directory
/bin/ls: cannot access /mnt/md3/documents/Secure/steam.txt: No such file or directory
/bin/ls: cannot access /mnt/md3/documents/Secure/Work: No such file or directory
/bin/ls: cannot access /mnt/md3/documents/Secure/Passport Application Declaration.pdf: No such file or directory
/bin/ls: cannot access /mnt/md3/documents/Secure/Bills: No such file or directory
/bin/ls: cannot access /mnt/md3/documents/Secure/Car: No such file or directory
/bin/ls: cannot access /mnt/md3/documents/Secure/Receipts: No such file or directory
/bin/ls: cannot access /mnt/md3/documents/Secure/.DS_Store: No such file or directory
/bin/ls: cannot access /mnt/md3/documents/Secure/._.DS_Store: No such file or directory
/bin/ls: cannot access /mnt/md3/documents/Secure/House: No such file or directory
/bin/ls: cannot access /mnt/md3/documents/Secure/Banking: No such file or directory
/bin/ls: cannot access /mnt/md3/documents/Secure/hmpo_reminder_2016_02_25.pdf: No such file or directory
/bin/ls: cannot access /mnt/md3/documents/Secure/hmrc_tax_code_2017_2018.pdf: No such file or directory
/bin/ls: cannot access /mnt/md3/documents/Secure/hmrc_tax_refund_2016_2017_full.pdf: No such file or directory
/bin/ls: cannot access /mnt/md3/documents/Secure/hmrc_tax_refund_2016_2017.pdf: No such file or directory
/bin/ls: cannot access /mnt/md3/documents/Secure/2017_11_26_disclosure_scotland_details.pdf: No such file or directory
/bin/ls: cannot access /mnt/md3/documents/Secure/2017_11_29_disclosure_scotland_basic_disclosure.pdf: No such file or directory
/bin/ls: cannot access /mnt/md3/documents/Secure/passport_scan.pdf: No such file or directory
total 12K
drwxrwxrwx 10 admin administrators 4.0K Feb 13 10:21 ./
drwxrwxrwx 9 admin administrators 4.0K Feb 13 09:53 ../
-????????? ? ? ? ? ? .DS_Store
-????????? ? ? ? ? ? ._.DS_Store
drwxr-xr-x 2 admin administrators 4.0K Apr 9 2017 .digest/
-????????? ? ? ? ? ? 2017_11_26_disclosure_scotland_details.pdf
-????????? ? ? ? ? ? 2017_11_29_disclosure_scotland_basic_disclosure.pdf
d????????? ? ? ? ? ? Banking/
d????????? ? ? ? ? ? Bills/
d????????? ? ? ? ? ? Car/
d????????? ? ? ? ? ? House/
-????????? ? ? ? ? ? Passport Application Declaration.pdf
d????????? ? ? ? ? ? Receipts/
d????????? ? ? ? ? ? Work/
-????????? ? ? ? ? ? battle.net.txt
-????????? ? ? ? ? ? hmpo_reminder_2016_02_25.pdf
-????????? ? ? ? ? ? hmrc_tax_code_2017_2018.pdf
-????????? ? ? ? ? ? hmrc_tax_refund_2016_2017.pdf
-????????? ? ? ? ? ? hmrc_tax_refund_2016_2017_full.pdf
-????????? ? ? ? ? ? passport_scan.pdf
-????????? ? ? ? ? ? steam.txt
Run Code Online (Sandbox Code Playgroud)
网上的其他帖子说这是由包含目录没有执行权限引起的,但从上面的片段中可以看出,这不是这里的原因,因为存在执行权限。
关于如何克服这最后一个障碍的任何想法?
这些目录都没有执行权限。根据您提供的信息,您已尝试将目录挂载为rw和ro。您需要将文件系统安装为rwx. 但是,您的问题可能是由于数据恢复破坏了文件系统权限。
遇到您问题的其他人似乎正在 Windows Active Directory 环境中使用 QNAP。此论坛帖子涉及此问题,如果您的环境与 Windows Active Directory 绑定,则可能会有所帮助。这是另一篇涉及 Windows 的帖子。我也找到了这个帖子。不确定它们是否适用,但在搜索您的问题时会出现。
我参考了关于 ecryptfs 的Arch Linux Wiki和关于 NTFS 安装的Arch Linux Wiki。以下是有关子文件夹权限和数据恢复类别的QNAP Wiki的链接。这些还应该有助于提供有关如何解决问题的更多信息。
我会从头开始。重新启动并重新安装您的系统。如果 mount 命令之前可以让您成功解密文件系统并安装,则需要将 root(sudo) 目录的权限更改为:
chmod go= [root directory name]
Run Code Online (Sandbox Code Playgroud)
您还可以尝试使用包装器手动挂载 ecryptfs:
ecryptfs-mount-private Path/To/File/System
Run Code Online (Sandbox Code Playgroud)
chmod如果权限仍然缺失,此步骤之后也可能会有所帮助。系统将提示您使用上述命令输入 ecryptfs 的安装密码。
如果您可以评论您遇到的任何其他问题,我可以更新更多相关解决方案的答案。我相信您的问题可能与损坏的数据恢复有关(要解决此问题,您需要遵循有关 QNAP 建议您如何进行数据恢复的指南),或者可能与 NFS 或 NTFS 访问控制列表设置阻止正确的权限有关。仅当您的环境也与 Windows 绑定时,这才应该相关。如果有人有任何补充,我将不胜感激。祝你好运!