Mac always warns "You can't undo this action" and skips the Trash when deleting a file
I repaired the permissions on my iMac and am now getting this dialog box whenever I delete something. I checked Finder > Preferences and "Empty Trash Securely" and "Show Warning" are both unchecked. When I delete a file I get a confirmation box and once I confirm, the file is deleted completely, skipping the Trash:
Are you sure you want to delete "filename"?
This item will be deleted immediately. You can't undo this action.
Any way to have it move items to the Trash, the default way?
EDIT: Here's the screenshot of the dialog.
This came up when I created an empty folder on my Desktop and chose "Move to Trash".
It is what will always happen on any drive that the Finder cannot create a .trash folder. This is the same with written CDs, read-only USBs, most network shares (if you write to the root folder, it'll make a trash folder).
As it is happening on your own hard drive, it may be that you no longer own the Trash folder. This command will make your user account take ownership of it.
'sudo chown youruser ~/.Trash'
There's no Finder command to delete a file outright. The function is "Move to Trash" and has the shortcut command+delete.
What exactly are you doing that is prompting this dialog box to show up? Also, can you post a screen shot of it? (Hit command+shift+4 and then hit spacebar to capture a single UI element like a dialog box.)
You may get an authentication dialog if you try to delete system files, but there should be no warning if you just want to move something, say, on your Desktop to the trash. I would recommend that you actually keep the "Show warning before emptying the trash" selected so you can move as many files as you like to the trash freely and then get confirmation when deleting them for good.
The only situation where files will be deleted outright instead of being moved to trash is when you are working on a network share. That is normal behavior.
One last thing: make sure that the trash actually exists by opening up Terminal and running ls -la ~
One of the first few lines that comes up should look like this:
drwx------ 3 nreilingh staff 102 Feb 6 13:26 .Trash
The leading .
makes it a hidden folder, and your user should have write access.
EDIT: I suppose it's possible that the permissions repair you mentioned didn't execute completely or properly. I would do that (and a disk repair) again just for kicks, and then start searching the filesystem for extended attributes. Perhaps the OS has labeled your homedirectory with an extended attribute that prevents it from trashing normally. No idea why that might have occurred, but there are only so many things that can go wrong.
Also to be sure, is you filesystem structured normally with everything in a standard OS X hierarchy on the main boot disk?
I faced the same problem after upgrading macOS Sierra to Mojave. The hidden .Trash
folder in my user folder was recognized as file rather than a directory.
Deleting it fixed the problem. Open Terminal by hitting cmd + spacebar and searching for "Terminal". Copy and paste this command into the terminal and hit Return:
rm ~/.Trash
macOS will create a new .Trash
folder on the first "Move to Thrash" action and moving files to the Trash should work normally again.