LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 05-16-2005, 03:30 AM   #1
irvken
Member
 
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

Code:
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, 06:03 AM   #2
irvken
Member
 
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, 08:52 PM   #3
JDCoder
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.

JDCoder

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


Reply



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 08:42 AM
readonly boot karlan Linux - General 1 03-10-2004 09:09 AM
Readonly drives Andy@DP Linux - Newbie 1 08-23-2003 07:52 PM
Editing Readonly Files jatabe Linux - Networking 5 08-01-2003 02:01 PM
unset a readonly variable hamster Linux - General 2 05-19-2003 05:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:59 AM.

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