LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-21-2004, 11:02 PM   #1
randomtask
LQ Newbie
 
Registered: Apr 2004
Distribution: fedora core 5
Posts: 10

Rep: Reputation: 0
remove write-protected file


hi,

how do u remove the write-protected file(s)?
 
Old 04-21-2004, 11:47 PM   #2
Squall
Member
 
Registered: Jan 2004
Location: The land of the free and the home of the brave
Distribution: Slack 10
Posts: 239

Rep: Reputation: 30
Which write protected files do you want to remove? Be careful, and be sure they're not subdirectories of /

If you are certain you want to delete this file, just type "su" and enter the password and do the same thing as a super user.

If that still doesn't work, type (as root) "chmod +w filename"
 
Old 04-22-2004, 12:38 AM   #3
randomtask
LQ Newbie
 
Registered: Apr 2004
Distribution: fedora core 5
Posts: 10

Original Poster
Rep: Reputation: 0
I wanted to rm the mp3 files from my usb drive.

[root@192 thumb]# rm *.mp3
rm: remove write-protected regular file `Creed - Higher.mp3'? y
rm: cannot remove `Creed - Higher.mp3': Read-only file system
rm: remove write-protected regular file `Creed - One Lasy Breath.mp3'? y
rm: cannot remove `Creed - One Lasy Breath.mp3': Read-only file system

as you can see this files couldn't be deleted.
 
Old 04-22-2004, 01:08 AM   #4
pave_spectre
Member
 
Registered: Jan 2004
Location: Behind You!
Distribution: Slackware 10 | SmoothWall 2.0 | FreeBSD 4.8
Posts: 56

Rep: Reputation: 15
By any chance would the USB drive have a small switch on it that enables/disables write-protection?

Otherwise it looks like you may have mounted it read-only and will need to mount it read-write.
 
Old 04-22-2004, 02:55 AM   #5
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Milwaukee, WI
Distribution: Mint
Posts: 6,642

Rep: Reputation: 69
Alternatively, as long as nothing else on the USB drive needed to be saved, you could just reformat it. -- J.W.
 
Old 04-22-2004, 03:06 AM   #6
randomtask
LQ Newbie
 
Registered: Apr 2004
Distribution: fedora core 5
Posts: 10

Original Poster
Rep: Reputation: 0
thanx 4 all the reply. I managed to remove all the mp3 files. it seems that when I plug in the usb drive while running redhat, all the files in it becomes read-only. after reboot (usb drive still attached to the pc), all the mp3 files can be deleted.
 
  


Reply


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cant remove write protected weird file tuxombie Slackware 13 12-07-2004 09:44 AM
unmount write protected disk pradi_net Linux - Hardware 1 05-18-2004 02:48 PM
NTFS Write-Protected? MindFlayer Mandriva 12 05-04-2004 05:36 PM
mounted network share gets write-protected! Falafel Linux - Networking 1 10-23-2003 07:45 AM
Remove write file access for single user? HighLife Linux - Newbie 1 08-08-2003 12:22 AM


All times are GMT -5. The time now is 11:20 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration