LinuxQuestions.org
Register a domain and help support LQ
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 09-17-2005, 12:54 PM   #1
robintw
Member
 
Registered: Jul 2004
Posts: 48

Rep: Reputation: 15
Permission Denied when trying to delete /var


Hi

I've recently put a hard drive from an old linux system into my new one. There is some important data on the drive which I need to keep - but I need to delete the bin, usr, var etc etc directories. Some of those delete ok - but when I try to delete some of them (with rm -rf) I get a permission denied error. I've tried doing chmod -R 777 on the directory - but still get the error. Is there any way to 'force delete regardless of anything' these directories?

Thanks,

Robin
 
Old 09-17-2005, 01:02 PM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
1. Where have you mounted the old filesystem from the old disk onto your new filesystem. For example, have you tried something like:

mkdir /old_root
mount /dev/hd<NNN> /old_root
rm -rf /okld_root/var

2. Have you tried doing this in single-user mode?
In "boot from CD" mode?
 
Old 09-17-2005, 01:12 PM   #3
robintw
Member
 
Registered: Jul 2004
Posts: 48

Original Poster
Rep: Reputation: 15
Hi

I've mounted it in a directory inside /mnt. So it is /mnt/120gb/var that I am trying to delete.

I'll try it in Single User mode (running init 3) and see what happens.

Thanks,

Robin
 
Old 09-17-2005, 01:20 PM   #4
robintw
Member
 
Registered: Jul 2004
Posts: 48

Original Poster
Rep: Reputation: 15
Hi

I've tried running it in single user mode - it still gives the Permission Denied errors. Now it also gives a Sementation Fault - it gives all sorts of details about this but I'm not sure which details I should give in this post - any ideas of what to post would be useful!

Thanks,

Robin
 
Old 09-17-2005, 02:00 PM   #5
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
In single user mode, try:

1. run "fsck" on the drive (something corrupt)?

2. try "rm -rf" a directory at a time (who's the
culprit? All of "//mnt/120gb/var", or something in particular?)

Last edited by paulsm4; 09-17-2005 at 02:05 PM.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
cps printing problem - /var/spool (permission denied) carboncopy Slackware 10 11-11-2004 03:28 AM
/var/log/news permission denied tt08 Linux - Newbie 4 10-30-2004 10:19 AM
Delete file in /var chii-chan Linux - Newbie 5 03-19-2004 04:58 PM
Tried to delete file as root but it says I don't have permission to delete it! beejayzed Mandriva 23 03-12-2004 02:46 AM
Permission denied @ /var/log/mail Thorsten Linux - Software 1 11-03-2003 06:44 PM


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