我以 root 用户身份登录,但为什么我无法删除下面的文件?
#ONT/system/shell> ls -lt
-rwxrwxrwx 1 root root 4824 Jan 1 1970 flash_lock
#ONT/system/shell>rm flash_lock
rm: remove 'flash_lock'? y
rm: cannot remove 'flash_lock': Read-only file system
#ONT/system/shell>
ONT/system/shell>mount
rootfs on / type rootfs (rw)
/dev/root on / type cramfs (ro)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
/dev/root on /dev/.static/dev type cramfs (ro)
tmpfs on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw)
/dev/mtdblock1 on /mnt/rwdir type jffs2 (rw)
/dev/mtdblock2 on /mnt/backupdir type cramfs (ro)
ONT/system/shell>df
Filesystem 1k-blocks Used Available Use% Mounted on
rootfs 15996 15996 0 100% /
/dev/root 15996 15996 0 100% /
/dev/root 15996 15996 0 100% /dev/.static/dev
/dev/mtdblock1 1536 440 1096 29% /mnt/rwdir
/dev/mtdblock2 16000 16000 0 100% /mnt/backupdir
#ONT/system/shell>
#ONT/system/shell>
答案1
只读文件系统
正在读取的文件系统仅胜过文件权限。
您无法写入只读文件系统。因此,您无法更新目录以删除该文件的条目。这导致您无法删除该文件。