Can't Delete Files! Two different messages...

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

  1. hadi27 macrumors newbie

    Joined:
    Jan 6, 2010
    #1
    Hey guys hope everyone is doing good.

    Recently I have been trying to delete files and I'm getting a variation of messages. Either it tells me that the "file is in use" when its NOT or it will delete the file immediately, bypassing the trash.

    I would like the files to go to the trash first like they always use to rather than being deleted immediately.

    Also it tells me i can't delete alot of files because they are in use. However, they are not in use or open at all...

    How can I correct this? Is this a disk problem?

    Help is appreciated
     
  2. natewsmith macrumors regular

    Joined:
    Sep 9, 2007
    Location:
    Santa Clara, CA
  3. hadi27 thread starter macrumors newbie

    Joined:
    Jan 6, 2010
    #5
    ewilson6 - I don't want to keep having to restart my computer everytime I have to delete a file. That would be a case.

    I have only one account on this mac which is the one I use. This all just changed randomly one day about 2 weeks ago...

    I can't drag items from where they are located to the trash. It just doesn't move. And if i hit command+delete it simply says the file is in use.

    That apple page talks about the files being locked, but none of the files are locked either
     
  4. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #6
    Did you also check permissions, as that page also discussed?
    That obviously doesn't always work, hence, the Apple support article on the topic.
    Completely uncalled for, especially since you don't have a full grasp of the problem.
     
  5. -aggie- macrumors P6

    -aggie-

    Joined:
    Jun 19, 2009
    Location:
    Where bunnies are welcome.
    #7
    And as he was told to do in the 2nd post.
     
  6. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #8
    Exactly!
     
  7. hadi27 thread starter macrumors newbie

    Joined:
    Jan 6, 2010
    #9
    I did run "repair disk permissions". It corrected a whole lot.

    BUT

    the problem persists. I was able to delete one file after I restarted and It did the same thing again.


    EDIT: The volumes on the left side are 250GB toshiba HD which has a branch off to My Computer. Then the other one below that is the DVD drive

    I ran the repair permissions for the Toshiba HD, now im doing in on My Computer although I think it wouldn't make too much of a difference (correct me if i am wrong?)
     
  8. -aggie- macrumors P6

    -aggie-

    Joined:
    Jun 19, 2009
    Location:
    Where bunnies are welcome.
    #10
    right click>Get Info>Check the Sharing and Permissions and let us know what you have.
     
  9. hadi27 thread starter macrumors newbie

    Joined:
    Jan 6, 2010
    #11
    It says exactly


    Hadi (Me) - Read & Write
    staff - read only
    everyone - read only



    Well i learnt something new. I didnt know about "staff" and "everyone"
     
  10. Hal Itosis macrumors 6502a

    Hal Itosis

    Joined:
    Feb 20, 2010
    #12
    09:48 PM
    What is the exact name/type/location of the file, and what is the exact wording of the message? Or... what happened to the "two different messages" business? [i also don't see any OS version mentioned... which have you got?]

    Care to list your trash folder with Terminal?

    ls -alOe ~/.Trash
     
  11. hadi27 thread starter macrumors newbie

    Joined:
    Jan 6, 2010
    #13
    hey! sorry for the late reply.

    But I am running on the new macbook with snow leopard (10.6.3)

    Here are screenshot of the two messages. Either it will delete, and delete immediately without trash OR it will then say it CAN NOT

    [​IMG]

    [​IMG]
     
  12. Hal Itosis macrumors 6502a

    Hal Itosis

    Joined:
    Feb 20, 2010
    #14
    As far as immediate deletion goes, i suspect that when you get around to running my Terminal command we will learn that your trash directory is owned by root. (If that turns out to be the case, we can restore your rightful ownership with another Terminal command).

    The "in use" part may be due to a quirk with Preview.app which sometimes keeps tabs on documents even after they are closed. If that's the case, usually simply quitting Preview does the trick. [else, we can investigate that further once we get rid the first problem.]
     
  13. hadi27 thread starter macrumors newbie

    Joined:
    Jan 6, 2010
    #15
    Hal Itosis - The preview application is not running. I made sure to quit it. That is a .pdf file that I tried deleting but it also happens with other extensions. Word would be another one that I have seen it do....But as of right now I tried deleting word and other extensions and they deleted right away. PDF still does not go away easily
     
  14. Hal Itosis macrumors 6502a

    Hal Itosis

    Joined:
    Feb 20, 2010
    #16
    That's okay... we can figure that out later using lsof or fs_usage perhaps.

    Meanwhile, it's been 4 days since i first requested a trash listing (and this makes the 3rd request now):

    ls -alOe ~/.Trash

    We really need to get that part nailed down first.
    No rush for me though... my trash is working fine.

    Take your time.
     
  15. hadi27 thread starter macrumors newbie

    Joined:
    Jan 6, 2010
    #17
    [​IMG]

    There is the screenshot of me putting that into terminal
     
  16. Hal Itosis macrumors 6502a

    Hal Itosis

    Joined:
    Feb 20, 2010
    #18
    And a lovely screenshot it is (clearly the trash directory has improper settings).

    FWIW, text can be selected and copied in the Terminal window... and then pasted into messages here (which can be handy in that the text can then be copied again and reused in replies, etc).

    Onward then... use copy/paste to run these four commands, one at a time:

    sudo chflags -R 0 ~/.Trash

    sudo chmod -R -N ~/.Trash

    sudo chown $(id -u):$(id -g) ~/.Trash

    chmod 700 ~/.Trash

    An admin password will be requested, but not echoed to the screen when typed.

    Since we weren't even able to see your trash (and posting another list command doesn't seem expedient), i simply threw everything in the book at it there. I suggest that —after running those 4 commands (which should succeed silently) —that it may be worth it to relaunch Finder (or logout/login), to ensure that Finder is forced to notice the improvements we made.

    Let us know if that is indeed the case. These sorts of problems interest me, and i often wonder what caused them, and if indeed the trash was the only item affected.
     
  17. hadi27 thread starter macrumors newbie

    Joined:
    Jan 6, 2010
    #19
    OMG it worked! So...what exactly did that do? does it change the settings for any other programs?
    I can drag to the trash again and delete properly without telling me it is in use!


    When I did all that and went back to trash it had recovered files in there:

    [​IMG]

    Also, do you know what causes something like that?


    I really appreciate the help...I can hear the paper balls hittin the trash can again lol
     
  18. Hal Itosis macrumors 6502a

    Hal Itosis

    Joined:
    Feb 20, 2010
    #20
    Reset the whole ball of wax (owner, group, flags, perms) on your user account's trash folder.

    All we touched was that one trash folder.

    We never got to see what *exactly* was wrong, but some person or program/script messed it up somehow. Being that it's your machine, your guess should be better than mine. [i.e., other than Apple updates, to which installer and/or utility did you provide a password when requested (around the time you first noticed this trash problem)?]
     

Share This Page