![即使使用 sudo 也无法 rm/chmod](https://linux22.com/image/198264/%E5%8D%B3%E4%BD%BF%E4%BD%BF%E7%94%A8%20sudo%20%E4%B9%9F%E6%97%A0%E6%B3%95%20rm%2Fchmod.png)
我对 Linux 还是个新手,但已经能够利用网络上的资源解决大部分问题。但是有一个问题我需要帮助:
在终端中时ls -al,似乎出现错误:
total 400
drwxr-xr-x 1 allen allen 2496 Nov 12 19:31 .
drwxr-xr-x 1 allen allen 792 Nov 12 19:18 ..
.
.
.
drwxr-xr-x 1 allen allen 22 Nov 7 12:52 OpenLP
-rw------- 1 allen allen 27 Nov 2 17:17 plasma-localerc
-rw------- 1 allen allen 36 Nov 2 17:17 plasma-nm
-rw------- 1 allen allen 1022 Nov 12 19:31 plasma-org.kde.plasma.desktop-appletsrc
-rw------- 1 allen allen 1022 Nov 12 19:31 plasma-org.kde.plasma.desktop-appletsrc
-rw------- 1 allen allen 1022 Nov 12 19:31 plasma-org.kde.plasma.desktop-appletsrc
-rw------- 1 allen allen 1022 Nov 12 19:31 plasma-org.kde.plasma.desktop-appletsrc
-rw------- 1 allen allen 1022 Nov 12 19:31 plasma-org.kde.plasma.desktop-appletsrc
-rw------- 1 allen allen 1022 Nov 12 19:31 plasma-org.kde.plasma.desktop-appletsrc
-rw------- 1 allen allen 1022 Nov 12 19:31 plasma-org.kde.plasma.desktop-appletsrc
-rw------- 1 allen allen 1022 Nov 12 19:31 plasma-org.kde.plasma.desktop-appletsrc
-rw------- 1 allen allen 1022 Nov 12 19:31 plasma-org.kde.plasma.desktop-appletsrc
-rw------- 1 allen allen 1022 Nov 12 19:31 plasma-org.kde.plasma.desktop-appletsrc
-rw------- 1 allen allen 1022 Nov 12 19:31 plasma-org.kde.plasma.desktop-appletsrc
-rw------- 1 allen allen 1022 Nov 12 19:31 plasma-org.kde.plasma.desktop-appletsrc
-rw------- 1 allen allen 1022 Nov 12 19:31 plasma-org.kde.plasma.desktop-appletsrc
-rw------- 1 allen allen 1022 Nov 12 19:31 plasma-org.kde.plasma.desktop-appletsrc
-rw------- 1 allen allen 1022 Nov 12 19:31 plasma-org.kde.plasma.desktop-appletsrc
-rw------- 1 allen allen 1022 Nov 12 19:31 plasma-org.kde.plasma.desktop-appletsrc
-rw------- 1 allen allen 1022 Nov 12 19:31 plasma-org.kde.plasma.desktop-appletsrc
-????????? ? ? ? ? ? plasma-org.kde.plasma.desktop-appletsrc.lock
-????????? ? ? ? ? ? plasma-org.kde.plasma.desktop-appletsrc.lock
-????????? ? ? ? ? ? plasma-org.kde.plasma.desktop-appletsrc.lock
-????????? ? ? ? ? ? plasma-org.kde.plasma.desktop-appletsrc.lock
-????????? ? ? ? ? ? plasma-org.kde.plasma.desktop-appletsrc.lock
-????????? ? ? ? ? ? plasma-org.kde.plasma.desktop-appletsrc.lock
-????????? ? ? ? ? ? plasma-org.kde.plasma.desktop-appletsrc.lock
-????????? ? ? ? ? ? plasma-org.kde.plasma.desktop-appletsrc.lock
-????????? ? ? ? ? ? plasma-org.kde.plasma.desktop-appletsrc.lock
-????????? ? ? ? ? ? plasma-org.kde.plasma.desktop-appletsrc.lock
-????????? ? ? ? ? ? plasma-org.kde.plasma.desktop-appletsrc.lock
-????????? ? ? ? ? ? plasma-org.kde.plasma.desktop-appletsrc.lock
-????????? ? ? ? ? ? plasma-org.kde.plasma.desktop-appletsrc.lock
-????????? ? ? ? ? ? plasma-org.kde.plasma.desktop-appletsrc.lock
-????????? ? ? ? ? ? plasma-org.kde.plasma.desktop-appletsrc.lock
-????????? ? ? ? ? ? plasma-org.kde.plasma.desktop-appletsrc.lock
-????????? ? ? ? ? ? plasma-org.kde.plasma.desktop-appletsrc.lock
-rw-r--r-- 1 allen allen 73 Nov 4 13:31 plasmarc
-rw------- 1 allen allen 1139 Nov 12 18:57 plasmashellrc
drwxr-xr-x 1 allen allen 22 Nov 2 17:17 plasma-workspace
-rw------- 1 allen allen 44 Nov 2 17:17 powerdevilrc
-rw------- 1 allen allen 890 Nov 4 13:39 powermanagementprofilesrc
drwx------ 1 allen allen 0 Nov 6 22:10 procps
drwxr-xr-x 1 allen allen 30 Nov 12 18:58 Projecteur
drwx------ 1 allen allen 500 Nov 2 17:17 pulse
drwxr-xr-x 1 allen allen 112 Oct 20 09:19 qpdfview
drwxr-xr-x 1 allen allen 24 Nov 4 14:33 Qt
drwx------ 1 allen allen 0 Nov 4 13:32 qtcurve
drwxr-xr-x 1 allen allen 68 Nov 4 15:52 QtProject
然而,简单的ls将列出文件和目录而不会出现错误。
我尝试使用,sudo rm -rf但它回复无法访问文件,并sudo chmod给出了相同的结果。我能做些什么?
该帐户确实具有 sudo 权限:
sudo cat /etc/sudoers 1 (0.002s)
[sudo] password for allen:
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
allen ALL=(root) NOPASSWD:/usr/bin/onedrive-stop.sh
allen ALL=(root) NOPASSWD:/usr/bin/onedrive-start.sh
# See sudoers(5) for more information on "@include" directives:
@includedir /etc/sudoers.d
答案1
因为安装是在包含根目录和主目录的 btrfs 分区上,所以我从实时 USB 启动,并使用以下命令来解决问题,
sudo btrfs check --repair /dev/sda3
如果您想应用此命令,请相应地更改设备路径
谢谢大家输入