Use this method if you’re trying to delete a file that belongs to you but (e. g. , you’re the owner or in a group that has access to read the file) but don’t have permission to delete it. If you’re signed in remotely and already at a command prompt, just skip to the next step.

Use this method if you’re trying to delete a file that belongs to you but (e. g. , you’re the owner or in a group that has access to read the file) but don’t have permission to delete it. If you’re signed in remotely and already at a command prompt, just skip to the next step.

r is read permissions, w is write permissions, and x is execute permissions. The first three characters in the permissions (in this example, r–), are the file owner’s permissions. So, in this example, the owner of the file only has read permissions, which means they can’t write to, execute, or delete the file. The second three characters are group permissions. If you’re a member of a group and that group has write permissions to the file, you’ll be able to delete it even if you’re not the owner. The third three characters are world permissions, which is everyone else.

If you’re not the file owner but have root access to the system, you can use sudo chmod -v u+rw filename to give yourself the right permissions. To see the file’s new permissions, run ls -al again.

If you aren’t able to delete the file after making it writable, its partition may be mounted read-only. See Fixing the Read Only File System Error to troubleshoot.

Use this method if you are not the owner of the file you want to delete and you’d rather just delete the file instead of first changing its permissions. If you’re signed in remotely and already at a command prompt, just skip to the next step.

Use this method if you are not the owner of the file you want to delete and you’d rather just delete the file instead of first changing its permissions. If you’re signed in remotely and already at a command prompt, just skip to the next step.

If you aren’t able to delete the file with sudo, its partition may be mounted read-only. See Fixing the Read Only File System Error to troubleshoot.

If you’re signed in remotely, just move to the next step.

If you’re signed in remotely, just move to the next step.

If you see ro in the results, the file system is read-only. Remounting the drive should fix the error. To do so, use mount -o remount,rw mount point. You can then delete the file. If the permissions are rw, the disk is mounted with read-write permissions, which means you should be able to delete files without problems. This usually means there’s a problem with the file system on the drive. Continue with this method. If you see remount-ro, this means the there’s a problem with the file system and the drive was remounted as read-only to limit additional damage. This also means there’s a problem with the file system on the drive. Continue with this method.

Since you can’t unmount a root file system, you can’t check the file system of the root partition unless you’re booted into recovery mode. If the error is on the root file system, boot into recovery mode first.

If there are errors, back up the drive before you continue in case the file system cannot be repaired.

Even if you are able to correct errors, make a backup just in case the drive is dying.