Locked file - i ain't no newbie - read on...:

Discussion in 'Mac Basics and Help' started by bizzeebeever, Feb 3, 2010.

  1. bizzeebeever, Feb 3, 2010
    Last edited: Jun 12, 2014

    bizzeebeever macrumors newbie

    Joined:
    Feb 3, 2010
    #1
    Ok, got Mac Panther (x.3.9) on an ancient iMac.

    Have a 250 GB HDD in it. Originally installed Mac 9 a few years ago; upgraded to X.3. Has 2 Mac (HFS+) partitions on it: MacintoshHD (system is installed there, 8GB), and HD_1 (my files, 70+GB). Boots, runs fine, no prob.

    My problem is with 300+ files in 2 folders that are left over from mac 9. They are in the trash, and are now locked, utterly. When I try to empty the trash, the error message says "The operation cannot be completed because you do not have sufficient privileges for some of the items."

    As you may know, when dealing with multiple "disks" (read: partitions), Mac X puts a .Trash or .Trashes folder on each disk. The trash folders on my computer are located on the following paths:

    /users/(my name)/.Trash
    /volumes/HD_1/.Trashes/501

    There is at least 1 locked file and 1 locked folder (with numerous sub-folders) in each .Trash(es) folder.

    Here's what I've tried to do:

    • unlock the files in the GUI, using the "show info" pane. every time i "unlock" the files and folders, I close out the info pane, and the file/folder goes back to being locked.
    • secure empty trash (same error)
    • use: # sudo rm theFileName (no go) sudo rm -rd theFolderName (FUBAR)
    • change the uchg (and all other) flags using
      #sudo chflags -R nouchg theFileName
      and THEN delete the file (not a chance).
    • change the ownership of the files/folders to ANY user, and then try to unlock/delete them (who was I kidding?)
    • log in in single-user cli mode, and run the following commands, as per the Apple instructions for Mac OSX 10.3.9:
      • # mount -uw /
      • # /usr/libexec/register_mach_bootstrap_servers /etc/mach_init.d
      • # /System/Library/CoreServices/SecurityServer -X
      • # find / -flags schg -exec chflags noschg {} \;
      • "Then type reboot." (Hah! Did NOTHING!)
    • Log in as God (a/k/a, root), and do all of the above.
    • get special apps that claim to be able to unlock locked folders.
    • I even went a step farther. I disabled journalling with Disk Utility, then I logged onto the computer in single user mode, under a Linux installation that's on the same disk (I thought I was so smart!). Then, after mounting the HFS+ filesystems in r/w mode to temporary directories, I attempted to remove the files from there, OR even change the file flags -- permission denied!!! Even after I chown'ed the files to "root" and logged in under multi-user CLI mode! (Meanwhile, I can do whatever I want to other, normal files on the HFS+ partitions!)

    So, uh, if anybody out there can give me any suggestions, other than just wiping my partitions and doing a re-install, it'd be a big help.

    (Added details: )
    This evening, I logged in as root, and used "mv" to rename the .trash folders for my main user profile to something else that began with a ".". When I logged back in - yeehaw! - the trash canister was empty, and I can now use the trash as usual. However, those pesky locked files are still on my hard drive, albeit hidden...!


    Solution (for any moron like me who still doesn't know how to fix this): I booted into single-user mode, mounted the partition in question, then ran `chflags nouchg` on the offending files/directories. Was able to delete from there.
     
  2. BlueRevolution macrumors 603

    BlueRevolution

    Joined:
    Jul 26, 2004
    Location:
    Montreal, QC
    #2
    Try

    ls -la / ~

    then paste the lines mentioning the offending directories back here.
     

Share This Page