can not do rm on a file

James Tappin sjt at star.sr.bham.ac.uk
Fri Jan 7 21:35:00 UTC 2011


On Sat, 8 Jan 2011 02:46:11 +0530
Tapas Mishra <mightydreams at gmail.com> wrote:

TM> This is the most frustrating problem I have ever faced and posting
TM> here. I have a file file.something ls -l output
TM> 
TM> -rwxr-xr-x 1 tapas tapas        30 2010-10-06 20:14 file1.txt
TM> -rwxr-xr-x 1 tapas tapas 441712640 2011-01-08 02:40 file2.exe
TM> 
TM> now I do as root
TM> 
TM> rm file2.exe
TM> rm: cannot remove `file2.exe': Read-only file system
TM> 
TM> How is this possible inspite of the read write permissions I am not
TM> able to delete it I have tried it doing as root even.
TM> The OS is 10.04 64 bit.

The error message is saying that the filesystme is mounted read-only.
This may be an intentional move in which case "mount -o remount,rw
<mount-point>" will work (where <mount-point> is the mount point of the
file system as revealed from /etc/fstab or from df [e.g. /home /data
/usr/local ...]). This can also be caused by a corrupted filesystem, in
which case your easiest option would be to copy the stuff you do want to
another disk and replace or at least reformat[*] this one. And of course
all optical media (even CDRW and DVD-RW) are instrinsically read only.

[*] Unless I had a pretty good idea why it got currupted (e.g. a memory
stick in a camera that got currupted when the battery went flat) I'd be
very disinclined to use a reformatted device for anything important.

-- 
+------------------------+-------------------------------+---------+
| James Tappin           | School of Physics & Astronomy |  O__    |
| sjt at star.sr.bham.ac.uk | University of Birmingham      | --  \/` |
| Ph: 0121-414-6462. Fax: 0121-414-3722                  |         |
+--------------------------------------------------------+---------+




More information about the ubuntu-users mailing list