丟失+找到的文件無法訪問

丟失+找到的文件無法訪問

(這原則上與Stack Overflow 上的問題 15800742,但它得到的答案以及我在互聯網上找到的各種其他答案對我來說都不起作用。

在檔案系統崩潰和 fsck 之後,我最終得到了一個 /lost+found 目錄,其中包含一些檔案(常規檔案和目錄),我無法弄清楚如何做任何有用的事情。

系統資訊:

toomas ~ # uname -a
Linux toomas 4.10.0-38-generic #42~16.04.1-Ubuntu SMP Tue Oct 10 16:32:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
root@toomas ~ # chmod --version | head -1
chmod (GNU coreutils) 8.25
root@toomas ~ # lsb_release -d
Description:    Linux Mint 18.3 Sylvia
root@toomas ~ # id -u
0

檔案系統安裝在/mnt:

root@toomas ~ # mount | grep /mnt
/dev/sdb1 on /mnt type ext4 (rw,relatime,block_validity,delalloc,barrier,user_xattr,acl)

我以#16792(剛好是目錄)為例:

root@toomas ~ # d="/mnt/lost+found/#16792"
root@toomas ~ # ls -ld $d
d--S-ws-w- 2 90907680 1161865838 4096 Nov 13  2215 /mnt/lost+found/#16792

(UID 和 GID 雖然明顯很大,但應該是合法的:adduser 在我的系統上接受的最大 UID 是 2^32 - 2 = 4294967294,並且 ID 在 2^32 處換行為零。)

更改權限失敗:

root@toomas ~ # chmod 755 $d
chmod: changing permissions of '/mnt/lost+found/#16792': Operation not permitted

更改所有權失敗:

root@toomas ~ # chown root $d
chmod: changing ownership of '/mnt/lost+found/#16792': Operation not permitted

lsattr/chattr 也沒幫助:

root@toomas ~ # lsattr -d $d
lsattr: Permission denied While reading flags on /mnt/lost+found/#16792

無論如何,嘗試聊天,以防萬一:

root@toomas ~ # chattr -i $d
chattr: Permission denied while reading flags on /mnt/lost+found/#16792

我還可以嘗試什麼來查看和/或刪除這些文件?

相關內容