6

When I try and move something to the trash like so:

gvfs-trash filename

I get the error

Error deleting file: Unable to find or create wastebasket directory

Deleting files with Nautilus comes up with a similar error. How can I fix this?

texasflood
  • 457
  • 2
  • 6
  • 18

1 Answers1

5

The solution was simple, in my case running the command

ls -ld ~/.local/share/Trash/

Gave the output:

drwx------ 4 root root 4096 Jun 13 20:19 /home/user/.local/share/Trash/

For some reason unknown to me, the trash directory was owned by root, which is not what we want. So I ran:

sudo chown -R user:user ~/.local/share/Trash/

which solved the problem.

Also, the permissions may be incorrect, so run

sudo chmod -R 700 ~/.local/share/Trash/
texasflood
  • 457
  • 2
  • 6
  • 18
  • Thank you! I was trying al morning to fix it! messing with my fstab and running mkdirs... You had the answer for me! Now to see why libreoffice 5.4 refuses to run on lubuntu 17/10... – yinon Oct 18 '17 at 09:52