1 2 Previous Next 23 Replies Latest reply: May 27, 2012 5:00 PM by Avi Dolgin
Avi Dolgin Level 1 Level 1 (25 points)

Since reinstalling my Lion, the Trash has been strange. I can't just drag stuff there without getting a dialogue box telling me it will be deleted immediately. That requires me to click my agreement.  Same thing happens if I right-click my mouse and choose the Trash option.  So my Trash basket stays empty, and I go through a two-step process with every file or program I want to be rid of.

 

iMac with OS 10.7.4

  • 1. Re: Can't just drag to the Trash
    Niel Level 10 Level 10 (242,115 points)

    Click on the item in the Finder's sidebar with the house icon and verify that you are able to write to this folder in the Sharing & Permissions section of the Get Info window, and that it isn't locked; if it is already set this way and you get that error, open the Terminal in the /Applications/Utilities/ folder and run the following:

     

    mkdir ~/.Trash

     

    If you get a message stating that the folder exists, run the following:

     

    sudo chown $UID ~/.Trash

    chmod u+rwx ~/.Trash

     

    The first command in the second set will prompt you for your administrator password; nothing will appear in the Terminal window while it is being typed. In either case, click on the Finder icon in the Dock with the Control and Option keys pressed, and relaunch it.

     

    (66640)

  • 2. Re: Can't just drag to the Trash
    Avi Dolgin Level 1 Level 1 (25 points)

    I'm sorry, but this didn't help me at all.

    Way above my head!

     

    I couldn't figure out which Get Info you meant, so I tried it for my test file, I tried it for the house icon, I tried it for the desktop folder and I tried it for the Trash itself.  The first ones listed a variety of read only or read & write options for various users, but after unlocking the Get Info box I still couldn't change anything. Nor did I understand why it would help.  And as for the Get Info for Trash, it didn't even offer me a Sharing & Permissions.

     

    I found the Terminal and then didn't know what to do.  I've never run a program. So I copied your command line and went to Shell/New Command and dropped it into the box there and hit run.  Nothing happened.

  • 4. Re: Can't just drag to the Trash
    X423424X Level 6 Level 6 (14,190 points)

    I found the Terminal and then didn't know what to do.

     

    Launch Terminal (from Utilities) and a window will be displayed.

     

    You copy/paste each of the commands Niel listed one at a time and hit return.  So here they are again (but I slightly changed some of them):

     

    mkdir -p ~/.Trash

     

    Hit return.  Nothing will happen.  You will just see another prompt on the terminal.

     

    sudo chown $UID ~/.Trash

     

    Hit return.  You will be prompted for your admin password.  Enter it.  Nothing will type in the terminal window as you type your admin password.  Hit return again.  You may see a bunch of warning messages.  Ignore them and answer yes to anything it may ask.

     

    sudo chmod 700 ~/.Trash

     

    Hit return.  Again because of sudo you may get another prompt for you admin password (or may not this time).

     

    Now log out and log back in.  Hopefully you're trash will work as expected.

     

    -----------

     

    Of course another way is to simply rm the ~/.Trash and log out and log back in and the finder would recreate the .Trash but I don't want to show the exact way that is done do to the dangers involved with novice terminal users.  I'm just mentioning it here for the sake of completeness.

  • 5. Re: Can't just drag to the Trash
    Avi Dolgin Level 1 Level 1 (25 points)

    Thanks. But it didn't quite work.

     

    I entered the first command,

    then the second command,

    then got a warning that I ignored,

    then I entered the admin password (and, just as you said, nothing showed),

    and got the response "chown: $UID: Invalid argument", 

    then I entered the final command

    and got the response "chmod: ~/.Trash: No such file or directory"

     

    So on reboot, the problem is still there.

     

    (note to Yasmin Yim: Yes, I checked that page before I asked my question.  But the first instruction on the page is "drag file to Trash" - which is exactly what I CAN NOT do)

  • 6. Re: Can't just drag to the Trash
    X423424X Level 6 Level 6 (14,190 points)

    Just want to check something.  In terminal copy/paste the following two commands (hit return after each one):

     

    echo $UID

    ls -ld ~/.Trash

     

    What do you get?

  • 7. Re: Can't just drag to the Trash
    Avi Dolgin Level 1 Level 1 (25 points)

    Thanks.  I tried again

    I wasn't sure whether you wanted me to do the whole process, with admin password.  So the first time I just opened Terminal, entered the first command, got the response:

    $UID    [Process completed]

    Then I entered the second command and got:

    -ls: ~/.Trash: No such file or directory     [Process completed]

     

    And still couldn't drag to the Trash without the Delete Immediately? prompt

     

    So I did a restart to the computer and opened Terminal again.

     

    I went back to the instructions of your earlier email and copy&pasted   mkdir -p ~/.Trash

    and got the response:

    -mkdir: ~: Permission denied

    That didn't happen last time.  Things may be getting worse here.

     

    But anyway I went to the second of your instructions and entered   sudo chown $UID ~/.Trash

    This time I got asked for my password

    After I entered that, I ghot the response:

    chown: $UID: Invalid argument

     

    So then I tried the new line you just sent me  echo $UID

    Response:  $UID

    That's the same as earlier, so then I went with your last command   ls -ld ~/.Trash

    Response:  -ls: ~/.Trash: No such file or directory

     

     

    Three strikes!  I'm out!

  • 8. Re: Can't just drag to the Trash
    Niel Level 10 Level 10 (242,115 points)

    Run the following:

     

    chmod u+rwx ~

    chflags nouchg ~

     

    If that doesn't work, run

     

    ls -dlO@ ~

     

    and post back with the results.

     

    (66682)

  • 9. Re: Can't just drag to the Trash
    Avi Dolgin Level 1 Level 1 (25 points)

    OK.  Thanks for sticking with me.  Here goes.....

     

    Command     chmod u+rwx ~     gets the response     -chmod: ~: No such file or directory

    Command    chflags nouchg ~    gets the response    -chflags: ~: No such file or directory

    Command     ls -dlO@ ~       gets the response    -ls: ~: No such file or directory

     

    ????

  • 10. Re: Can't just drag to the Trash
    Niel Level 10 Level 10 (242,115 points)

    Run:

     

    echo ~

     

    and compare the result with that of the following command from the AppleScript Editor:

     

    POSIX path of (path to home folder)

     

    (66690)

  • 11. Re: Can't just drag to the Trash
    Avi Dolgin Level 1 Level 1 (25 points)

    Thanks for the quick reply.  I'm not sure what I'm doing - I don't usually mess with background stuff behind my software - so I'll describe every step.

     

    Open Terminal

    Run:    echo ~

    Response:   ~

     

    Run:    POSIX path of (path to home folder)

    Response:   Avis-iMac:~ avidolgin$

     

    Now what?

  • 12. Re: Can't just drag to the Trash
    X423424X Level 6 Level 6 (14,190 points)

    I beginning to think there's more going on here than just a missing .Trash or one with the wrong permissions.  None of these terminal behaviors make sense.

     

    You type echo $UID anf get back "$UID [Process completed]".  Not only would you not get back the string "$UID" but what's it doing saying "[Process completed]"?

     

    Similarly for ls -ld ~/.Trash.  Again with the "[Process completed]".

     

    echo ~ and you get ~?

     

    Let's try this one more time.  In the terminal window, copy/paste exactly the bolded words and only those words, one line at a time, and hit return:

    echo ~


    ls -ld ~/.Trash

     

    echo $UID

  • 13. Re: Can't just drag to the Trash
    Avi Dolgin Level 1 Level 1 (25 points)

    First, my thanks to both you and Niel for sticking with me through this.

    Second, be assured that I am doing cut&paste exactly as told with no extras, spaces or anything!

    Finally, the [Process completed] line appeared after all my command runs (except for admin password) - I just got bored telling you about it since I figured you'd seen it all so many times before.

     

    OK, here goes.  Opening Terminal and holding my breath......

    Enter:   echo ~

    Result:

    ~

     

    [Process completed]

     

     

    Enter:   ls -ld ~/.Trash

    Result:

    -ls: ~/.Trash: No such file or directory

     

    [Process completed]

     

     

    Enter:   echo $UID

    Result:

    $UID

     

    [Process completed]

     

     

    Not feeling hopeful, I then dragged a test file to the Trash

    Dialogue box:  This item will be deleted immediately. You can’t undo this action.

    Which is where I started.

  • 14. Re: Can't just drag to the Trash
    Niel Level 10 Level 10 (242,115 points)

    Open the AppleScript Editor in the /Applications/Utilities/ folder, not the Terminal, and run the following:

     

    do shell script "mkdir ~/.Trash"

     

    If you get a message stating that the folder exists, run the following:

     

    do shell script "chown $UID ~/.Trash" with administrator privileges

    do shell script "chmod u+rwx ~/.Trash"

     

    If you continue to experience issues with the Trash, rerun the other commands in the thread, modified like these were from the ones in my first reply.

     

    (66698)

1 2 Previous Next