LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   remove write-protected file (https://www.linuxquestions.org/questions/linux-newbie-8/remove-write-protected-file-173145/)

randomtask 04-21-2004 11:02 PM

remove write-protected file
 
hi,

how do u remove the write-protected file(s)?

Squall 04-21-2004 11:47 PM

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"

randomtask 04-22-2004 12:38 AM

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.

pave_spectre 04-22-2004 01:08 AM

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.

J.W. 04-22-2004 02:55 AM

Alternatively, as long as nothing else on the USB drive needed to be saved, you could just reformat it. -- J.W.

randomtask 04-22-2004 03:06 AM

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.


All times are GMT -5. The time now is 01:37 PM.