28

When I want to move a file to the Trash, Nautilus give me an message saying this:

You can't move example.file to the trash can. Do you want to remove it immediately?

I can give you this photo but it's in Spanish

enter image description here

6 Answers6

54

I had the same problem and found out that the trash had the wrong owner. So I deleted the trash folder and made a new one.

Steps:

  1. cd ~/.local/share
  2. ls -ld Trash
  3. Now you have to look if it has the right owner.
  4. If the owner is root - delete the folder with: sudo rm -r Trash
  5. mkdir -m 700 Trash

Hope I could help and that it solved your problem, because it did for me.

David Foerster
  • 36,890
  • 56
  • 97
  • 151
kr4utz
  • 671
20

As mentioned by kr4utz your problem is that Trash is owned by root.

A better way of changing the ownership without deleting the Trash folder would be to use the chown command from a terminal (Ctrl+Alt+T):

sudo chown -R "$USER" ~/.local/share/Trash

That will change the owner from root to yourself without deleting your Trash folder.

David Foerster
  • 36,890
  • 56
  • 97
  • 151
6

That's what worked for me, if the files that refuse to delete are on a partition which is not formatted as ext*:

Open /etc/fstab in any editor as root (e.g. using sudo nano /etc/fstab).

There add in the line of the partition you have problems the option uid=1000 (if your user ID is 1000, else change it)

Example:

/dev/sdb2   /media/scambio      vfat    rw,utf8,umask=0,uid=1000    0     0

and reboot

Byte Commander
  • 110,243
dr mat
  • 401
  • 5
  • 13
0

I found other solution that works for me. I had the folder Trash where the owner was root.

I delete the folder Trash like root user, you can do it directly from terminal with the correct command or like I did, I enter in the terminal the command:sudo nautilus, this open the nautilus like root user, I look for the folder Trash (.local/share/Trash) and I delete it (like root user) and after this I close the nautilus. I opened again the nautilus but like username (I mean normally), I delete some file and this automatically creates a folder Trash where the ownership now was my username.

Sorry for my english

Jan Wytze
  • 207
-3

I have tried all above solutions but they didn't worked for me. Then I just gave all the permissions to Trash folder and it worked. Follow the below steps-

Step 1: Open Terminal.

Step 2: Run the command- cd /home/username/.local/share

Note that you have to replace "username" with your username eg. for me it is- cd /home/willson/.local/share

Step 3: Give all the permissions to Trash folder using Command-

sudo chmod -R 700 Trash/

Now your deleted files will move to Trash.

-3

For me, it was that partition was mounted in a folder owned by root and others didn't have write permissions

drwxr-xr-x 22 root    root    4096 Sep 17 01:31 data

So the trash folder could not be created in the top folder

I just changed the permissions of the folder were the partition is mounted.... and voila, it worked!!!!

sudo chmod 777 data
mook765
  • 18,644