Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 05-16-2005, 04:30 AM   #1
Registered: Dec 2003
Location: uk
Distribution: Ubuntu/Debian/Android
Posts: 218

Rep: Reputation: 30
ReadOnly Directory problems

I've got some directories that I can't delete

rm /mnt/backup/main/
rm: cannot remove `/mnt/backup/main//first.doc': Read-only file system
I'm not sure how it became a readonly file system, certainly other directories on that partition are deletable and I can still write files to the partition which is mounted /dev/hdb2 on /mnt/backup?

How did only some of the directories become readonly and how can I rectify it?
Old 05-16-2005, 07:03 AM   #2
Registered: Dec 2003
Location: uk
Distribution: Ubuntu/Debian/Android
Posts: 218

Original Poster
Rep: Reputation: 30
problem solved now, but not until after 2 server reboots and mounting the drive specifically read/write, why that would be I don't know.
Old 02-23-2011, 09:52 PM   #3
LQ Newbie
Registered: Feb 2011
Posts: 3

Rep: Reputation: 0
Cannot delete readonly directories and files.

Partitioned and added a new usb drive. Applications were writing directories and files that were read-only and could not be deleted. Reformatting worked until applications added files.

Finally, I used Manage Disk Partitions to unmount the drive. I then selected expert mode and options. I changed the options to: NOSUID, USER, NOEXEC, NODEV; saved and remounted. I was then able delete any file or directory.

Original fstab entry:
# Entry for /dev/sdc1 :
UUID=52b0773b-97c4-41f0-ab61-f0a28f41d224 /usb40 ext4 user,noatime,user_xattr 0 0

After fstab entry:
# Entry for /dev/sdc1 :
UUID=52b0773b-97c4-41f0-ab61-f0a28f41d224 /usb40 ext4 user 0 0

I will be a little more careful partitioning and setting options for new drives.

I am sure there are other application/security situations this will not help, but it took care of my problem.


Last edited by JDCoder; 02-23-2011 at 09:53 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Formating USB Disk became readonly ReesAcheson Linux - Newbie 2 10-26-2005 09:42 AM
readonly boot karlan Linux - General 1 03-10-2004 10:09 AM
Readonly drives Andy@DP Linux - Newbie 1 08-23-2003 08:52 PM
Editing Readonly Files jatabe Linux - Networking 5 08-01-2003 03:01 PM
unset a readonly variable hamster Linux - General 2 05-19-2003 06:13 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:44 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration