6

I have a dual booted laptop with Windows 10 and Ubuntu on it. Most of the time when I try to delete a file I get the following warning:

Unable to find or create trash directory

See this dialog box:

enter image description here

I have tried the following answers for xubuntu located at this question

I have checked and I do own my trash directory

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

My user ID is 1000 and I have tried: $ sudo mkdir -p /.Trash-1000/{expunged,files,info} $ sudo chown -R $USER /.Trash-1000 And this has not worked either.

This answer seems to be only for NTFS file systems, but I have an ext4 file system.

How can I get a working trash folder?

Startec
  • 1,815

1 Answers1

7

I have two Ubuntu systems installed in different disks of one machine. I encountered the same problem when deleting files on another disk and I solved it by a method similar to https://askubuntu.com/a/262827/582507

First, confirm that your normal user is ID "1000":

$ id

Then go to the mount point i.e. the root directory of the other disk.

$ cd /media/username/root_of_the_disk
$ sudo mkdir -p .Trash-1000/{expunged,files,info}
$ sudo chown -R $USER .Trash-1000

Done.

応振强
  • 196
  • 1
  • 3
  • in my case the hard drives are in /mnt/, in media is empty and didn't work for me apply this /mnt/, – titusfx Dec 10 '21 at 17:22