LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-28-2004, 10:40 AM   #1
lvgamer1
LQ Newbie
 
Registered: Dec 2004
Location: Las Vegas
Posts: 3

Rep: Reputation: 0
How to delete directory/file (operation not permitted)?


I (think) I'm looking at the contents of a flash card (in USB flashcard reader/writer), and I'm trying to delete the contents of the card (2 non-empty directories and a (broken) link to a file.

I've tried rm, rm -f, rm -d, rmdir, etc...I keep getting an 'Operation not permitted' message. I've tried to remove both the link and one of the directories (with 0 success).

The permissions for these are even rwx for owner, group, and user.

Any help would be appreciated.
 
Old 12-28-2004, 11:04 AM   #2
linuxgeekery
Member
 
Registered: Jul 2004
Location: Austin, Texas!
Distribution: Gentoo
Posts: 121

Rep: Reputation: 15
Try 'rm -rf *' as root.
 
Old 12-28-2004, 11:14 AM   #3
lvgamer1
LQ Newbie
 
Registered: Dec 2004
Location: Las Vegas
Posts: 3

Original Poster
Rep: Reputation: 0
it's saying -rf* is not a valid option.

-rf is valid, but still giving me the "operation not permitted" even though I'm signed on as root.
 
Old 12-28-2004, 11:44 AM   #4
ksgill
Senior Member
 
Registered: Apr 2003
Location: Toronto, Canada
Distribution: Ubuntu Jaunty (9.04)
Posts: 1,044

Rep: Reputation: 45
DO the following as root:

First of all, you need to set the permissions of the directory that you are trying to delete. change the permissions of files in there by doing
chmod 777 -R /path/to/directory
This will allow everyone to read write and delete files. Then remove the files from within the directory by doing
cd /path/to/directory
rm *

that should work.

The reason -rf* doesnt work it that you need to have a space between -rf and *.

Last edited by ksgill; 12-28-2004 at 11:45 AM.
 
Old 12-28-2004, 11:53 AM   #5
lvgamer1
LQ Newbie
 
Registered: Dec 2004
Location: Las Vegas
Posts: 3

Original Poster
Rep: Reputation: 0
still not working....

it won't let me delete the directories, well, because they're directories, and I'm still getting 'operation not permitted' when I try to delete the link.

I've even tried to unmount the flash card reader/writer and it won't even let me do that (says device is busy).
 
  


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
chgrp: operation not permitted even though I own the file! the theorist Linux - Newbie 16 05-29-2010 12:02 AM
Operation not permitted jakkals Linux - General 3 09-26-2005 08:30 PM
su - operation not permitted jrtayloriv Linux - Newbie 2 06-09-2005 10:27 PM
operation not permitted jamaso Slackware 2 05-08-2004 06:55 AM
Operation not permitted FrozenShadow23 Linux - Newbie 6 10-05-2003 06:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:39 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration