前段时间,我的大多数文件都将其属性更改为范围。不确定它是如何或何时发生的,但是当我列出示例文件夹中的所有文件属性时,它看起来像这样:
user@user:~/Downloads$ lsattr *
--------------e------- balenaEtcher-1.7.9-x64.AppImage
--------------e------- balena-etcher-electron-1.7.9-linux-x64.zip
--------------e------- control.tar.xz
--------------e------- data.tar.xz
--------------e------- debian-binary
--------------e------- DisplayLink USB Graphics Software for Ubuntu5.6-EXE/displaylink-driver-5.6.0-59.176.run
--------------e------- DisplayLink USB Graphics Software for Ubuntu5.6-EXE/DisplayLink USB Graphics Software for Ubuntu 5.6.0-59.176-Release Notes.txt
--------------e------- DisplayLink USB Graphics Software for Ubuntu5.6-EXE.zip
--------------e------- ubuntu-22.04.1-desktop-amd64.iso
我读到过一些文章说它可以连接到磁盘分区,但我不知道如何检查它。我是 ubuntu 新手。它导致了很多问题,因为我无法修改、复制或删除任何文件。有什么想法可以解决这个问题吗?
编辑:我第一次观察到它是在我尝试通过 ssh 复制一些文件时。我创建了一些测试文件 test.txt 并尝试将其移动到[电子邮件保护]
user@user:~/Documents$ lsattr test.txt
--------------e------- test.txt
user@user:~/Documents$ scp test.txt [email protected]:/
[email protected]'s password:
scp: /test.txt: Permission denied
user@user:~/Documents$
此文件的权限
user@user:~/Documents$ ls -la
drwxr--r-- 4 user user 4096 paź 18 19:48 .
drwxr-x--- 26 user user 4096 paź 18 20:04 ..
drwxrwxr-x 8 user user 4096 wrz 21 15:53 old
drwxrwxr-x 3 user user 4096 paź 18 07:52 Projects
-rw-rw-r-- 1 user user 9 paź 18 19:46 test.txt
另一件奇怪的事情是,我无法删除某些目录。例如,当尝试删除“旧”目录时:
user@user:~/Documents/old$ ls
output-analyzer test_dir
user@user:~/Documents/old$ rm -r test_dir/
rm: cannot remove 'test_dir/': Operation not permitted
findmnt 命令的输出:
user@user:~$ findmnt
TARGET SOURCE FSTYPE OPTIONS
/ /dev/nvme0n1p2 ext4 rw,relatime,er
├─/sys sysfs sysfs rw,nosuid,node
│ ├─/sys/kernel/security securityfs securit rw,nosuid,node
│ ├─/sys/fs/cgroup cgroup2 cgroup2 rw,nosuid,node
│ ├─/sys/fs/pstore pstore pstore rw,nosuid,node
│ ├─/sys/firmware/efi/efivars efivarfs efivarf rw,nosuid,node
│ ├─/sys/fs/bpf bpf bpf rw,nosuid,node
│ ├─/sys/kernel/debug debugfs debugfs rw,nosuid,node
│ ├─/sys/kernel/tracing tracefs tracefs rw,nosuid,node
│ ├─/sys/fs/fuse/connections fusectl fusectl rw,nosuid,node
│ └─/sys/kernel/config configfs configf rw,nosuid,node
├─/proc proc proc rw,nosuid,node
│ ├─/proc/sys/fs/binfmt_misc systemd-1 autofs rw,relatime,fd
│ │ └─/proc/sys/fs/binfmt_misc binfmt_misc binfmt_ rw,nosuid,node
│ └─/proc/fs/nfsd nfsd nfsd rw,relatime
├─/dev udev devtmpf rw,nosuid,rela
│ ├─/dev/pts devpts devpts rw,nosuid,noex
│ ├─/dev/shm tmpfs tmpfs rw,nosuid,node
│ ├─/dev/hugepages hugetlbfs hugetlb rw,relatime,pa
│ └─/dev/mqueue mqueue mqueue rw,nosuid,node
├─/run tmpfs tmpfs rw,nosuid,node
│ ├─/run/lock tmpfs tmpfs rw,nosuid,node
│ ├─/run/credentials/systemd-sysusers.service
│ │ none ramfs ro,nosuid,node
│ ├─/run/rpc_pipefs sunrpc rpc_pip rw,relatime
│ ├─/run/snapd/ns tmpfs[/snapd/ns] tmpfs rw,nosuid,node
│ │ ├─/run/snapd/ns/snapd-desktop-integration.mnt
│ │ │ nsfs[mnt:[4026533314]]
│ │ │ nsfs rw
│ │ └─/run/snapd/ns/snap-store.mnt nsfs[mnt:[4026533318]]
│ │ nsfs rw
│ └─/run/user/1000 tmpfs tmpfs rw,nosuid,node
│ ├─/run/user/1000/gvfs gvfsd-fuse fuse.gv rw,nosuid,node
│ └─/run/user/1000/doc portal fuse.po rw,nosuid,node
├─/snap/bare/5 /dev/loop0 squashf ro,nodev,relat
├─/snap/code/108 /dev/loop1 squashf ro,nodev,relat
├─/snap/code/111 /dev/loop2 squashf ro,nodev,relat
├─/snap/core/13741 /dev/loop3 squashf ro,nodev,relat
├─/snap/core/13886 /dev/loop4 squashf ro,nodev,relat
├─/snap/core20/1611 /dev/loop5 squashf ro,nodev,relat
├─/snap/core20/1623 /dev/loop6 squashf ro,nodev,relat
├─/snap/firefox/1943 /dev/loop7 squashf ro,nodev,relat
├─/snap/firefox/1969 /dev/loop8 squashf ro,nodev,relat
├─/snap/gnome-3-38-2004/115 /dev/loop9 squashf ro,nodev,relat
├─/snap/gnome-3-38-2004/119 /dev/loop10 squashf ro,nodev,relat
├─/snap/gtk-common-themes/1534 /dev/loop11 squashf ro,nodev,relat
├─/snap/gtk-common-themes/1535 /dev/loop12 squashf ro,nodev,relat
├─/snap/notepad-plus-plus/374 /dev/loop13 squashf ro,nodev,relat
├─/snap/notepad-plus-plus/375 /dev/loop14 squashf ro,nodev,relat
├─/snap/snap-store/592 /dev/loop15 squashf ro,nodev,relat
├─/snap/snap-store/599 /dev/loop16 squashf ro,nodev,relat
├─/snap/snapd/17029 /dev/loop17 squashf ro,nodev,relat
├─/snap/snapd-desktop-integration/10 /dev/loop19 squashf ro,nodev,relat
├─/snap/snapd/17336 /dev/loop18 squashf ro,nodev,relat
├─/snap/snapd-desktop-integration/14 /dev/loop20 squashf ro,nodev,relat
├─/snap/wine-platform-7-devel-core20/19 /dev/loop21 squashf ro,nodev,relat
├─/snap/wine-platform-7-devel-core20/20 /dev/loop22 squashf ro,nodev,relat
├─/snap/wine-platform-runtime-core20/38 /dev/loop23 squashf ro,nodev,relat
├─/snap/wine-platform-runtime-core20/42 /dev/loop24 squashf ro,nodev,relat
├─/var/snap/firefox/common/host-hunspell /dev/nvme0n1p2[/usr/share/hunspell]
│ ext4 ro,noexec,noat
└─/boot/efi /dev/nvme0n1p1 vfat rw,relatime,fm