LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-18-2006, 12:07 PM   #1
solarize
LQ Newbie
 
Registered: May 2005
Location: Amsterdam, the Netherlands
Distribution: Fedore Core 3
Posts: 20

Rep: Reputation: 0
Unable to remove files


I've copied several files from a cd to my harddrive. Now I want to remove them by using rm. Unfortunately I always get the message 'permission denied' while the permissions are set correctly. Does anybody know how I can remove cd copied files
 
Old 08-18-2006, 01:05 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
The permission on the files may be correct. But, are the permission on the folder in which you stored them set to allow write permission?

Did you use root permissions to copy the files? If so, normal user can't rm them.

Have you tried su to root, then try to rm the files?
 
Old 08-18-2006, 02:39 PM   #3
solarize
LQ Newbie
 
Registered: May 2005
Location: Amsterdam, the Netherlands
Distribution: Fedore Core 3
Posts: 20

Original Poster
Rep: Reputation: 0
The files were copied under my user name. Also the dir and the files have my username as owner. I do not have root permission on the system, but that probably shouldn't matter, because I'm the owner of the files. I think it has something to do with attribute settings (such as immutability) of the files....
 
Old 08-18-2006, 02:54 PM   #4
soggycornflake
Member
 
Registered: May 2006
Location: England
Distribution: Slackware 10.2, Slamd64
Posts: 249

Rep: Reputation: 31
Quote:
Originally Posted by bigrigdriver
Did you use root permissions to copy the files? If so, normal user can't rm them.
Well, if the user owns the directory and has write permission to it he can.

Quote:
Originally Posted by solarize
I think it has something to do with attribute settings (such as immutability) of the files....
What fs is this on? This is only relevant on an ext2 filesystem, reiserfs for example, does not have attribute flags. Immutability has to be set manually, did you do this? Check it with lsattr <files>. If the i flag is set, remove it with chattr -i <files>.

Quote:
Originally Posted by solarize
Also the dir and the files have my username as owner.
What about the permissions? If you used cp -r to copy a directory tree from the CD, then it will be readonly...
 
Old 08-18-2006, 02:57 PM   #5
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
If you do a ls -al and look at the permissions on the file does it provide any clues ?
without knowing the permissions it will be hard to tell you why you can't delete them..
 
Old 08-18-2006, 03:41 PM   #6
solarize
LQ Newbie
 
Registered: May 2005
Location: Amsterdam, the Netherlands
Distribution: Fedore Core 3
Posts: 20

Original Poster
Rep: Reputation: 0
Quote:
What about the permissions? If you used cp -r to copy a directory tree from the CD, then it will be readonly...
Yes, that is the way I copied them. How can I delete readonly files? Are readonly special files?

In any case, here is the file listing in dir uml/:

dr-xr-xr-x 3 poude ii 512 Aug 18 14:13 .
drwxr-xr-x 10 poude st-ai 512 Aug 18 14:14 ..
-rwxrwxrwx 1 poude ii 137314307 Aug 18 14:13 UML_sp1_win.exe
drwxrwxrwx 2 poude ii 512 Aug 18 17:39 tmp

when I do

rm -rf uml/

I get:

rm: Unable to remove directory uml//tmp: Permission denied
rm: Unable to remove directory uml/: File exists
 
Old 08-20-2006, 06:09 AM   #7
solarize
LQ Newbie
 
Registered: May 2005
Location: Amsterdam, the Netherlands
Distribution: Fedore Core 3
Posts: 20

Original Poster
Rep: Reputation: 0
Problem solved... the uml dir was not writable
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to remove usbcore MOHCTP Debian 4 07-08-2005 10:14 AM
unable to remove a remote printer test-adm1n Linux - Software 2 04-26-2005 09:30 AM
Unable to use Add or Remove Packages !!! jmax24 Linux - General 1 04-13-2004 01:30 AM
unable to remove files/folders timsch75 Linux - Software 2 03-01-2004 11:01 AM
Unable to remove wine rpm's Ravenator Linux - Software 2 04-01-2003 06:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:24 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