-3

I am login as a root user but why I am not able to delete bellow file?

#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>
user9517
  • 115,471
  • 20
  • 215
  • 297
sadiq
  • 11
  • 1
  • 1
    How is your filesystem is read-only. You cannot perform operation requiring write/modification onto it (such as deleteing a file). The result of the `mount` command may be useful – Manu H Dec 03 '15 at 07:51

1 Answers1

7

Read-only file system

The filesystem being read only trumps the file permissions.

You cannot write to a read only filesystem. Therefore, you cannot update the directory to remove the entry for the file. This results in you not being able to delete the file.

user9517
  • 115,471
  • 20
  • 215
  • 297