Page 1 of 1

Undeletable locked file in Trash

Posted: Fri May 31, 2019 12:53 pm
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

Re: Undeletable locked file in Trash

Posted: Fri May 31, 2019 3:53 pm
by adespoton
Run Disk First Aid inside OS 9; your extents B tree on the guest filesystem is likely corrupt.

Re: Undeletable locked file in Trash

Posted: Fri May 31, 2019 4:21 pm
by TomMasz
Disk First Aid found no problems. File remains undeletable.

Re: Undeletable locked file in Trash

Posted: Fri May 31, 2019 4:33 pm
by adespoton
Try renaming the file; sometimes that's the issue.

Re: Undeletable locked file in Trash

Posted: Fri May 31, 2019 4:56 pm
by Ronald P. Regensburg
Where did the file reside before you dragged it to the Trash?

Re: Undeletable locked file in Trash

Posted: Fri May 31, 2019 5:25 pm
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.

Re: Undeletable locked file in Trash

Posted: Fri May 31, 2019 5:52 pm
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.

Re: Undeletable locked file in Trash

Posted: Fri May 31, 2019 6:20 pm
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.

Re: Undeletable locked file in Trash

Posted: Sun Jun 02, 2019 7:24 am
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.

Re: Undeletable locked file in Trash

Posted: Mon Jun 03, 2019 3:52 pm
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.