Can't delete file in OSX 10.5.8

Discussion in 'macOS' started by Slrman, Apr 14, 2010.

  1. Slrman macrumors member

    Slrman

    Joined:
    Jan 4, 2009
    Location:
    João Pessoa, Brazil
    #1
    I have a file in the drop box of my laptop running OSX 10.5.8 I have copied it to the appropriate folder (Music) but it will not permit me to delete it from the drop box folder.

    When I try to send it to the trash, it says it is locked. When I go to Get Info, it shows it locked but that area is grayed out. Even when I open the padlock with the password, it stays gray. (See attached file)

    This isn't a major problem, but I would like to get rid of this file because it's annoying when I can't get a computer do do what I tell it. ;) Every time I see it, it reminds me that the computer has gotten the best of me.

    Thanks for any ideas.
     

    Attached Files:

  2. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #2
    There are several flags that can be set on a given file. Some of these cannot be changed from the Finder, but all of them can have their values changed via the Terminal (some require sudo to gain root permissions). Your file probably has the uchg (user change) flag set, which is preventing you (or anyone else) from deleting or modifying the file. This situation can be corrected with a terminal command. The command needed is chflags, and its usage is thus:

    Code:
    chflags nouchg (drag file to the Terminal window)
    turns the user change flag off for one file - what you want. Where it says (drag file to the Terminal window), do exactly that - open the Finder to the folder with the offending file in it, and drop it on the Terminal. Make sure there's a space after the "nouchg" part of the command, before you drag the file.
     
  3. Slrman thread starter macrumors member

    Slrman

    Joined:
    Jan 4, 2009
    Location:
    João Pessoa, Brazil
    #3
    Thanks for the nice feedback. The only problem is, it doesn't work. When I do all of that, it says, "Permission Denied" Any other ideas?
     
  4. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #4
    Does prefixing the command with sudo and typing your password when prompted (note - your typing will not appear at all, not even as bullets; this is done for security reasons) make any difference? Make sure there's a space between the end of sudo and the start of the other command.
     
  5. Slrman thread starter macrumors member

    Slrman

    Joined:
    Jan 4, 2009
    Location:
    João Pessoa, Brazil
    #5
    Sorry, but no joy with that, either. It still says "Permission Denied" Now, I'm starting to become very determined to find out who is really in control here. There has to be a way to delete anything.
     
  6. Hal Itosis macrumors 6502a

    Hal Itosis

    Joined:
    Feb 20, 2010
    #6
    It's probably just an ACL. Since Finder Get Info windows don't reveal that much detail, you could list it for us using Terminal (which is always the first thing to do in situations like this anyway, imho):

    ls -lOe /path/to/the/file

    The ACL can be removed via:

    chmod -N /path/to/the/file

    ...and then the other stuff above should work. [if regular chmod -N fails, prepend with sudo.]

    EDIT: or perhaps there's a stronger flag than uchg on there, which the Terminal listing will reveal... and/or:

    sudo chflags 0 /path/to/the/file

    should remove.
     
  7. Slrman thread starter macrumors member

    Slrman

    Joined:
    Jan 4, 2009
    Location:
    João Pessoa, Brazil
    #7
    Yes, it is an ACL, but all that does is come back with "No such file or directory" Down in flames again. So far, Me = 0, Powerbook = 4
     
  8. iThinkergoiMac macrumors 68030

    Joined:
    Jan 20, 2010
    Location:
    Terra
    #8
    Well, if you want to delete it, you could sudo rm it. For example:

    Code:
    sudo rm -v ~/music/fileidontwant.extension
    Obviously, you would change the directory to go to the file you do want. Be careful with sudo rm, it's dangerous. The -v modifier makes it verbose, so it will tell you what it's deleting. You could add an f as well to the modifier string to force it, but I'd only do that if it doesn't work without it.

    Again, be very careful with this command. Do it wrong and you'll delete more than you want to and won't be able to get it back!
     
  9. Slrman thread starter macrumors member

    Slrman

    Joined:
    Jan 4, 2009
    Location:
    João Pessoa, Brazil
    #9
    Thanks for the suggestion, but I have already done this and it didn't work. I have no idea why this is so stubborn but I am despairing of ever being able to delete this. FYI, when I use the rm method, it says that the file or folder was not found.
     
  10. calderone macrumors 68040

    calderone

    Joined:
    Aug 28, 2009
    Location:
    Seattle
    #10
    The fact is, you are not the owner of the file, "nobody" is, which is odd because this is typically related to NFS shares.

    Since you are not the owner of the file, you are not allowed to delete it.

    That said, I recreated the problem.

    Placed a file in the drop box.
    Gave ownership to nobody.
    Locked the file.
    Removed the lock with sudo chflags 0 /path/to/file

    This successfully unlocked the file, and I was able to delete it.
     
  11. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
  12. Slrman thread starter macrumors member

    Slrman

    Joined:
    Jan 4, 2009
    Location:
    João Pessoa, Brazil
    #12
    That doesn't work, either. See the attachment for what happened in the Terminal.

    I think there may be something far more basic at fault here. This is a Titanium 15" Powerbook with OSX 10.5.8 installed. Perhaps there is a basic mismatch in the hardware and the OS? I know you aren't supposed to be able to install an OS inappropriate to the hardware, but even so....
     

    Attached Files:

  13. Hal Itosis macrumors 6502a

    Hal Itosis

    Joined:
    Feb 20, 2010
    #13

    What???
    You're not making sense.
    Show us a listing of its parent folder then:

    ls -alOe /path/to/the/parent-folder

    You simply must have entered the wrong filename, that's all.
    [drag it into Terminal to get the properly formatted filename]

    If it doesn't work, don't just tell us what happened... copy/paste the session text out of Terminal and show us here.

    Else... if this is a truly a tricky situation (as opposed to user error), then there may be directory damage. [use Disk Utility or DiskWarrior to fix.]

    --

    That looks like a normal sudo warning to me.

    Why would you attach a picture when you can easily copy text right from Terminal???
     
  14. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #14
    It's a path issue for the file as can be seen in the image attached two posts ago.

    It has the path as /user/public/if_your_happy.mid, but should be,
    Code:
    /Users/user/Public/if_your_happy.mid
    or
    Code:
    ~/Public/if_your_happy.mid
     
  15. Slrman thread starter macrumors member

    Slrman

    Joined:
    Jan 4, 2009
    Location:
    João Pessoa, Brazil
    #15
    Believe it or not, I have tried absolutely everything brought up here, not once but many times each. I know longer care, I bought this laptop to resell and am going to do exactly that and let the next owner deal with it. I am beyond tired of this and will not waste even one more second on it.

    Thanks for the suggestions, but none of them worked. The best I get, even with the rm -f, is "Permission denied" The file is only 4 kb so it's not worth the frustration and time.
     
  16. Hal Itosis macrumors 6502a

    Hal Itosis

    Joined:
    Feb 20, 2010
    #16
    Well... I don't believe it. :)

    Using angelwatt's suggestions then...

    ls -alOe ~/Public/if_your_happy.mid


    That will list it so we can see what's what.
     
  17. Slrman thread starter macrumors member

    Slrman

    Joined:
    Jan 4, 2009
    Location:
    João Pessoa, Brazil
    #17
    This may come as a surprise to you, but I really don't care if you believe it or not. I have done everything listed here several times and rechecked my entries very carefully to see that I was following the suggestions exactly.

    In my opinion, it's rather arrogant of you to tell me what I did or did not do. I am finished with wasting my time on this tiny little issue. So please no more suggestions, especially considering that, despite everyone's best efforts, nothing even came close to working.
     
  18. Slrman thread starter macrumors member

    Slrman

    Joined:
    Jan 4, 2009
    Location:
    João Pessoa, Brazil
    #19
    Thanks again for all the suggestions, even though they didn't work. But here's what did work, although accidentally. Perhaps this will be another clue so someone can say, "Aha! That's what happened!"

    I was on the iMac transferring a different file to the Public folder of the PowerBook. I noticed the obstinate file was there, so I tried deleting it from the iMac. Surprise! No problem at all. I have no idea why other than maybe the owner of record was me on the iMac and that's why it couldn't be deleted from the PowerBook. Just a guess on my part, but maybe someone has a more accurate idea?

    Anyway, thanks again for all the help. Now all I need is for the two memory modules to arrive so I can max out the memory. :D
     
  19. watchtower macrumors newbie

    Joined:
    Jul 30, 2013
    #20
    Same Issue Solved 2013

    I came upon this discussion on July 30, 2013.

    I had the same issue with one text file that could not be unlocked and had the "nobody" user with read/write "non-permissions". So that I could not add any new user permissions to override the greyed out "locked" permission.

    But, this was the same issue reported in this thread.

    The MacPro where I could not Trash a text file was ethernet cable connected to my Mac Pro laptop.

    The locked file had been transferred via Ethernet cable from the originating Mac Pro laptop TO the MacPro desktop.

    Reading this issue here on the forum down to the bottom made me return to the originating laptop then click on the connection to find the copy of it on my MacPro "slave in this case" desktop.

    Info showed that this same file accessed from the laptop "Master" now had the "locked" text file check box accessible and allowed me to "uncheck" it.

    The "nobody" user disappeared on both the laptop and the MacPro desktop.

    From the MacPro Desktop I could select it and send it to trash immediately.
    And, likewise, from the laptop connection view to the MacPro desktop in Finder I could also send the darned thing to Trash if I wanted.

    Thank you, Sirman, for finally fixing the problem for yourself and for me 3 years later!
     

Share This Page