Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Can't just drag to the Trash

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

Posted on May 23, 2012 7:45 PM

Reply
23 replies

May 23, 2012 7:47 PM in response to Avi Dolgin

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)

May 23, 2012 10:54 PM in response to Niel

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.

May 24, 2012 1:12 AM in response to Avi Dolgin

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.

May 24, 2012 7:59 AM in response to X423424X

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)

May 25, 2012 8:09 AM in response to X423424X

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!

May 25, 2012 3:12 PM in response to Avi Dolgin

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

May 25, 2012 4:31 PM in response to X423424X

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.

May 25, 2012 4:38 PM in response to Avi Dolgin

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)

May 25, 2012 6:38 PM in response to Niel

I'm willing to try anything.

Though, like I've said before, this is all spooky stuff to me and I'm not sure I'm doing it right.


I opened AppleScript Editor.

I found myself facing a blank window pane above and another below.

Into the top pane I pasted mkdir ~/.Trash (I didn't put in the quotation marks that were around it in your instructions)

I clicked on Run

A drop-down box appeared that said:

Syntax Error A unknown token can’t go after this identifier.


So then I cleared the window and did it again, but with the quotation marks.

"mkdir ~/.Trash" then appeared in both the upper pane and the lower pane.


Is that a message that the folder exists? I dunno.

So I put "chown $UID ~/.Trash" into the upper pane, hit Run and watched it appear in the lower pane as well.

Still no magic.

So I ran "chmod u+rwx ~/.Trash" and it also reappeared below.


Then I closed AppleScript Editor, and saved the script at the prompt.


Finally, I tried again to drag my test file to the Trash. But, no great surprise, nothing had changed.

Can't just drag to the Trash

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.