LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 01-10-2007, 03:31 AM   #1
Adrian Baker
Member
 
Registered: Apr 2004
Distribution: PCLinuxOS 2007 on my laptop and Suse 10.2 on my desktop.
Posts: 341

Rep: Reputation: 30
AAARRGGH! Can't delete stupid folder!


Please help as this is driving me mad!

I have a Fat32 partition that is shared betwen XP and Suse as a common drive. All of my music files are on this drive. Recently a new folder on there copied from a flash drive became corrupt and I can't delete it! Unfortunately it is nearly 1GB in size containing loads of mp3 files.

Suse refused to delete it using the GUI, and XP did too. Eventually I managed to change its properties and name with XP, and then delete it. BUT it is still there in a new folder called recycled/nprotect I believe that this is a Norton protection, but this folder isn't visble in XP and wont delete in Suse.

In a terminal (as root) I've tried:

rm -Rf nprotect (as well as just rm or rm -f or rm -R)


but I get an error message saying it is read only and can't be deleted!

I have a broken Suse instal at the moment and I can't even re-install as Suse instal crashes as it can't resize or work with this partition. It used to do so quite happily until I had this folder there.

Please, how do I get rid of this folder!!!
 
Old 01-10-2007, 03:45 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
It shouldn't be read-only on a FAT drive, if you have mounted the partition read-write. What about the file permissions?
Code:
ls -ld /path/to/this/directory/
Have you run fsck on the filesystem to see if it is corrupt, not just the directory.
 
Old 01-10-2007, 03:47 AM   #3
carl0ski
Member
 
Registered: Sep 2004
Location: Melbourne, Victoria Australia
Distribution: Support those that support you :)
Posts: 872
Blog Entries: 12

Rep: Reputation: 30
Are you able to delete other folders on the Fat drive?

as root try

chown -R root:root Recycled
chmod -R 777 Recyled

hopefully this will change/strip the readonly flags
and try to delete again

rm -Rf nprotect\*

ps i'm pretty sure nprotect is a folder so you cant delete it using rm
rmdir --ignore-fail-on-nonempty nprotect
 
Old 01-10-2007, 03:50 AM   #4
IndyGunFreak
Senior Member
 
Registered: Aug 2003
Location: Indpls
Distribution: Laptops: Debian Jessie XFCE, NAS: OpenMediaVault 3.0
Posts: 1,355

Rep: Reputation: 70
Quote:
Originally Posted by Adrian Baker
Please help as this is driving me mad!

I have a Fat32 partition that is shared betwen XP and Suse as a common drive. All of my music files are on this drive. Recently a new folder on there copied from a flash drive became corrupt and I can't delete it! Unfortunately it is nearly 1GB in size containing loads of mp3 files.

Suse refused to delete it using the GUI, and XP did too. Eventually I managed to change its properties and name with XP, and then delete it. BUT it is still there in a new folder called recycled/nprotect I believe that this is a Norton protection, but this folder isn't visble in XP and wont delete in Suse.

In a terminal (as root) I've tried:

rm -Rf nprotect (as well as just rm or rm -f or rm -R)


but I get an error message saying it is read only and can't be deleted!

I have a broken Suse instal at the moment and I can't even re-install as Suse instal crashes as it can't resize or work with this partition. It used to do so quite happily until I had this folder there.

Please, how do I get rid of this folder!!!
I've had a problem similar to this under Ubuntu, I simply used Nautilus (I don't know if thats on Suse or not)...

Open a Terminal
Sudo Nautilus (or however you initiate root commands under suse)
It then opened up a graphical file manager that had root access.
Navigate to the folder, Right Click, delete.

IGF
 
Old 01-10-2007, 04:17 AM   #5
Adrian Baker
Member
 
Registered: Apr 2004
Distribution: PCLinuxOS 2007 on my laptop and Suse 10.2 on my desktop.
Posts: 341

Original Poster
Rep: Reputation: 30
Some great advice here folks. I'll try some things suggested and get back to you.

Thanks. I'll keep you posted
 
Old 01-10-2007, 04:29 AM   #6
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by carl0ski
ps i'm pretty sure nprotect is a folder so you cant delete it using rm
rmdir --ignore-fail-on-nonempty nprotect
In my experience, using rm -r will delete a folder even if it has files/folders in it.
 
Old 01-10-2007, 04:29 AM   #7
Sepero
Member
 
Registered: Jul 2004
Location: Tampa, Florida, USA
Distribution: Ubuntu
Posts: 734
Blog Entries: 1

Rep: Reputation: 33
I suggest following IndyGunFreak's advice.
Also, make sure the filesystem has been fsck'd (checked clean). AND that the filesystem isn't mounted read-only under Suse.
 
Old 01-10-2007, 04:52 AM   #8
Adrian Baker
Member
 
Registered: Apr 2004
Distribution: PCLinuxOS 2007 on my laptop and Suse 10.2 on my desktop.
Posts: 341

Original Poster
Rep: Reputation: 30
hmm... still no luck. Am I doing something wrong?

First check permissions:

Quote:
bsc-inoudijhtkc:/mnt/sharedisc # ls -ld /mnt/sharedisc/recycled
drwxrwxrwx 3 root root 8192 2006-12-17 11:49 /mnt/sharedisc/recycled
tried rm again - no good

Tried rmdir - no good

Quote:
bsc-inoudijhtkc:/mnt/sharedisc # rmdir --ignore-fail-on-non-empty recycled
bsc-inoudijhtkc:/mnt/sharedisc # ls
4.2 reports Dec '06.doc L6th tutor 1.doc
aaaaa.doc L6th tutor 2.doc
aaaatsts.odt Linux
aabbaabb.odt memo - dark roooooooom.odt
adrian minutes.doc
AHB groups Physics Resources
AS data handling recovered
AS Materials presentations recycled
It is still there!

deleting it with file manager as root also fails.

I haven't done checkdisc though. How exactly do I do this and what am I looking for?
 
Old 01-10-2007, 06:38 AM   #9
Adrian Baker
Member
 
Registered: Apr 2004
Distribution: PCLinuxOS 2007 on my laptop and Suse 10.2 on my desktop.
Posts: 341

Original Poster
Rep: Reputation: 30
I had a play with fsck. this is what happened;

Quote:
bsc-inoudijhtkc:/mnt/sharedisc # fsck
fsck 1.39 (29-May-2006)
reiserfsck 3.6.19 (2003 www.namesys.com)

*************************************************************
** If you are using the latest reiserfsprogs and it fails **
** please email bug reports to reiserfs-list@namesys.com, **
** providing as much information as possible -- your **
** hardware, kernel, patches, settings, all reiserfsck **
** messages (including version), the reiserfsck logfile, **
** check the syslog file for any related information. **
** If you would like advice on using this program, support **
** is available for $25 at www.namesys.com/support.html. **
*************************************************************

Will read-only check consistency of the filesystem on /dev/hda3
Will put log info to 'stdout'

Do you want to run this program?[N/Yes] (note need to type Yes if you do):yes
fsck.reiserfs /dev/hda3 failed (status 0x10). Run manually!
bsc-inoudijhtkc:/mnt/sharedisc #


Run manually???? I'm still puzzled! What can I try next?
 
Old 01-10-2007, 08:47 AM   #10
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
Please post the contents of /etc/fstab.

If you're /dev/hda3 is really the FAT partition, you shouldn't run reiserfsck on it. That's used for Reiser filesystems, not FAT ones.

Instead, try
Code:
fsck /dev/hda3
or
Code:
fsck.<fs_type> /dev/hda3
where <fs_type> should be replaced by the filesystem type indicated in /etc/fstab (ie "vfat", "msdos", ...).

And if it's really Norton that's preventing file access (altough I don't see how), try going into Windows, disabling the Norton utilities altogether and then retry the delete.

Last edited by timmeke; 01-10-2007 at 08:48 AM.
 
Old 01-10-2007, 09:47 AM   #11
Adrian Baker
Member
 
Registered: Apr 2004
Distribution: PCLinuxOS 2007 on my laptop and Suse 10.2 on my desktop.
Posts: 341

Original Poster
Rep: Reputation: 30
Hi there

OK, I made a silly mistake, sorry... my vfat shared file is hda5 not hda3

So I ran fsck as suggested:
Quote:
bsc-inoudijhtkc:/home/adrian # fsck /dev/hda5
fsck 1.39 (29-May-2006)
dosfsck 2.11, 12 Mar 2005, FAT32, LFN
There are differences between boot sector and its backup.
Differences: (offsetriginal/backup)
65:01/00
1) Copy original to backup
2) Copy backup to original
3) No action
So which option do I want??
Thanks for all the help by the way.


EDIT: Ignore this posting for now. I did option 3 and have found some problems. back in a minute or two.

Last edited by Adrian Baker; 01-10-2007 at 09:49 AM.
 
Old 01-10-2007, 10:03 AM   #12
Adrian Baker
Member
 
Registered: Apr 2004
Distribution: PCLinuxOS 2007 on my laptop and Suse 10.2 on my desktop.
Posts: 341

Original Poster
Rep: Reputation: 30
I get 100+ error messages (one for each mp3) that looks like this:

Quote:
/RECYCLED/NPROTECT/00000048.MP3
File size is 4800679 bytes, cluster chain length is 0 bytes.
Truncating file to 0 bytes.
/iTunes music/Aerosmith/Armageddon/Sweet Emotion.mp3 and
/RECYCLED/NPROTECT/00000049.MP3
share clusters.
1) Truncate first to 0 bytes
2) Truncate second to 3153920 bytes
? 2
/RECYCLED/NPROTECT/00000049.MP3
File size is 3366706 bytes, cluster chain length is 0 bytes.
Truncating file to 0 bytes.
/iTunes music/Aerosmith/O, Yeah! Ultimate Aerosmith Hits/Aerosmith - Knocking On Heaven's Doo.mp3 and
/RECYCLED/NPROTECT/00000050.MP3
share clusters.
1) Truncate first to 0 bytes
2) Truncate second to 1556480 bytes
? 2
/RECYCLED/NPROTECT/00000050.MP3
File size is 1617600 bytes, cluster chain length is 0 bytes.
Truncating file to 0 bytes.
/iTunes music/Aerosmith/O, Yeah! Ultimate Aerosmith Hits/Aerosmith - Knocking On Heaven's Doo.mp3 and
/RECYCLED/NPROTECT/00000051.MP3
share clusters.
1) Truncate first to 0 bytes
2) Truncate second to 3178496 bytes
? 2
/RECYCLED/NPROTECT/00000051.MP3
File size is 1898897 bytes, cluster chain length is 0 bytes.
Truncating file to 0 bytes.
/iTunes music/Aerosmith/O, Yeah! Ultimate Aerosmith Hits/Aerosmith - Knocking On Heaven's Doo.mp3 and
/RECYCLED/NPROTECT/00000052.MP3
share clusters.
1) Truncate first to 0 bytes
2) Truncate second to 5079040 bytes
? 2

After 100 or so files (i chose option 2 as you can see) i got:

Quote:
/iTunes music/Aretha Franklin/Aretha's Best/13 Chain Of Fools.m4a and
/RECYCLED/NPROTECT/00000170.M4A
share clusters.
1) Truncate first to 0 bytes
2) Truncate second to 2424832 bytes
? 2
/RECYCLED/NPROTECT/00000170.M4A
File size is 3089425 bytes, cluster chain length is 0 bytes.
Truncating file to 0 bytes.
/RECYCLED/NPROTECT/00000172.M4A
Contains a free cluster (547623). Assuming EOF.
/RECYCLED/NPROTECT/00000172.M4A
File size is 3485990 bytes, cluster chain length is 0 bytes.
Truncating file to 0 bytes.
/RECYCLED/NPROTECT/00000183.MP3
File size is 6765582 bytes, cluster chain length is 2539520 bytes.
Truncating file to 2539520 bytes.
/System Volume Information/_restore{970BF179-4538-46F7-A171-F13CFC09440B}/RP156/change.log.4 and
/RECYCLED/NPROTECT/00000187.MP3
share clusters.
1) Truncate first to 3170304 bytes
2) Truncate second to 8192 bytes
? 2
/RECYCLED/NPROTECT/00000187.MP3
File size is 3719078 bytes, cluster chain length is 3170304 bytes.
Truncating file to 3170304 bytes.
/RECYCLED/NPROTECT/00000183.MP3 and
/RECYCLED/NPROTECT/00000188.MP3
share clusters.
1) Truncate first to 0 bytes
2) Truncate second to 1933312 bytes
? 1
Internal error: didn't find cluster 459257 in chain starting at 393053
bsc-inoudijhtkc:/home/adrian #
So my disc is well messed up! This is definitely a Norton protection issue in windows (shouldn't ever use it should I?), but how do i sort this out?

I've emptied the Norton protected Trash can in windows.

Last edited by Adrian Baker; 01-10-2007 at 10:04 AM.
 
Old 01-10-2007, 10:13 AM   #13
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Under windows, remove Norton and reformat the disk.
I had the same with a usb stick (without the norton part), all files were messed. Even with a lot of linux tools I didn't manage.
Reformating under windows corrected the problem.
 
Old 01-10-2007, 06:31 PM   #14
Sepero
Member
 
Registered: Jul 2004
Location: Tampa, Florida, USA
Distribution: Ubuntu
Posts: 734
Blog Entries: 1

Rep: Reputation: 33
Run this on the filesystem under Linux:
fsck.vfat -a /dev/hda5

After it finishes, then try:
sudo rm -R /pathto/RECYCLED
 
Old 01-11-2007, 02:40 AM   #15
Adrian Baker
Member
 
Registered: Apr 2004
Distribution: PCLinuxOS 2007 on my laptop and Suse 10.2 on my desktop.
Posts: 341

Original Poster
Rep: Reputation: 30
Thank you all for your help. I've finally sorted it out. As nothing in Linux would delete this folder I backed up all the info on that drive and then rebooted in Windows. XP did a checkdisc routine and identified all kinds of problems that it tried to 'put-right'. I then disabled Norton and emptied everything (again) out of the recycle bin. I then deleted everything I could from that partition.

I then rebooted in Linux and this time I COULD remove the directory!

I have now reformatted the disc and re-installed Suse 10.2.

Thanks for all the help and advice. Much appreciated.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
find and delete files - stupid question though smshuja Linux - Newbie 5 12-29-2005 01:21 AM
seems like I delete my /etc folder. bladehaze Debian 9 09-12-2005 11:47 AM
How do I delete a folder and everything in it? wuya Linux - Newbie 3 04-22-2005 02:03 PM
I just delete the /lib folder :( Boogieman Linux - Software 8 07-13-2004 05:06 PM
How to delete the whole folder without being prompted anything conkhikho Linux - Newbie 1 10-27-2003 01:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:24 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
Open Source Consulting | Domain Registration