Rm can't delete file

As the error message says: the filesystem on which omitted is located is read-only. You can't do anything to modify that filesystem, including removing files.

You can check the mount point of the filesystem by running df omitted. It is probably /mnt given the command you're running.

You can remount the filesystem as read-write by running

mount -o remount,rw /mnt

However it would be a good idea to find out why the filesystem was mounted as read-only in the first place. This may be an indication that you should not be deleting those files.

Run mount | grep /mnt to see what options were specified when mounting that filesystem. For an ext2/ext3/ext4 filesystem, if the options did not include ro (read-only) but included errors=remount-ro, it looks like the filesystem was damaged and was automatically remounted as read-only to limit the damage; you will find more information in the kernel logs.

Note that your command attempts to remove the mount point itself, but this is harmless you won't have permission to do it anyway.

By the way, I strongly urge you not to use chmod 777. It is extremely rare to actually need these permissions, and they can cause a lot of harm (especially when you typo the argument, but even when not). If you try to remove a file and get a “permission denied” error, all you need to do is give yourself permission to write to the containing directory: generally, that's chmod -R u+w /path/to/toplevel/directory.


You have a device mounted in /mnt/... that is read only

try to umount every folder in /mnt and then try again.

a CD mounted here would cause this problem but are you root?

Tags:

Readonly

Rm