
(이것은 원칙적으로 다음과 같습니다.스택 오버플로의 질문 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에서 0으로 줄 바꿈됩니다.)
권한 변경 실패:
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
이 파일을 보거나 삭제하려면 또 무엇을 시도해야 합니까?