0

I was trying to remove a directory from my hard drive. But after typing a

sudo rm -r -f ./

command, it says

cannot remove [...] read-only file system.

I also tried the

sudo mount -o remount,rw /mnt

command, but this time it says

only root can use --options option

Do you have any fix for that?
I really need to remove that folder!

  • Is that a different partition? if so, unmount it, run fsck on it, mount it again and try to delete the folder. Usually the read-only mode is the SO way to protect the filesystem from corruption. – bistoco Jun 18 '19 at 18:06
  • If it is an NTFS (Windows filesystem) you will have to mount it correctly in /etc/fstab – Cobolt Jun 18 '19 at 21:36
  • If it is NTFS try to run ntfsfix /dev/sdx and remount with -rw option – Khimananda Oli Jun 21 '19 at 2:30