Undeletable locked file in Trash

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

Post Reply
TomMasz
Space Cadet
Posts: 4
Joined: Fri May 31, 2019 12:43 pm

Undeletable locked file in Trash

Post by TomMasz »

I ended up with a rather large locked Toast file in Trash that I can't delete. Holding down the Option key causes the Trash can to momentarily to change to the empty icon but then returns to the full icon. I can't unlock it and attempts to move it to the Unix (shared) drive always results in a copy. How do I get rid of this short of nuking my installation and starting over? Thanks.

SS 2.5 (2019-05-04), OS X 10.14.5
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Undeletable locked file in Trash

Post by adespoton »

Run Disk First Aid inside OS 9; your extents B tree on the guest filesystem is likely corrupt.
TomMasz
Space Cadet
Posts: 4
Joined: Fri May 31, 2019 12:43 pm

Re: Undeletable locked file in Trash

Post by TomMasz »

Disk First Aid found no problems. File remains undeletable.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Undeletable locked file in Trash

Post by adespoton »

Try renaming the file; sometimes that's the issue.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Undeletable locked file in Trash

Post by Ronald P. Regensburg »

Where did the file reside before you dragged it to the Trash?
TomMasz
Space Cadet
Posts: 4
Joined: Fri May 31, 2019 12:43 pm

Re: Undeletable locked file in Trash

Post by TomMasz »

The file can't be renamed because it is locked. It also can't be unlocked.

The file originated on shared "Unix" drive. I moved it to Hard Disk but I need disk room and tried to delete it, which is when I discovered I can't delete or move it back to Unix without copying.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Undeletable locked file in Trash

Post by adespoton »

At this point your best option may be to create a new disk image of the same size, mount it, and copy all your stuff over. Shouldn't take that long. Either that, or boot off a different disk image and then attempt to empty the trash.

If you dragged the file to the desktop and not the internal drive, then the file's still in the shared folder. But based on your careful choice of words, I don't think that's the issue.
TomMasz
Space Cadet
Posts: 4
Joined: Fri May 31, 2019 12:43 pm

Re: Undeletable locked file in Trash

Post by TomMasz »

Took a chance and tried using ResEdit to change the locked bit and it worked. i had forgotten ResEdit can edit more than resource forks.
Elyus
Tinkerer
Posts: 94
Joined: Wed Mar 21, 2012 12:35 am

Re: Undeletable locked file in Trash

Post by Elyus »

I'm glad to hear you found a fix using ResEdit! I ran into the issue a couple months ago and stumbled across the method described here to unlock the file. If you encounter the problem a lot, which can happen when moving files through the shared disk depending on the host, it might be worth a look.

In short, a bug in Finder can prevent it from locking & unlocking files if the creator or file type resources are missing or unreadable. You can use Creator Changer to manually fill these fields, which will allow the Finder to again edit the file under General Info.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Undeletable locked file in Trash

Post by adespoton »

Back in the day, my go-to tools for this kind of thing were ResEdit and FileBuddy. Totally forgot about the fact that files could be resource-locked separately from physical or Finder lock.
Post Reply