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
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
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:
cd ~/.local/share
ls -ld Trash
root
- delete the folder with: sudo rm -r Trash
mkdir -m 700 Trash
Hope I could help and that it solved your problem, because it did for me.
sudo chown -R $USER: Trash
as mentioned in the other answer should work as well to get the owner right...
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.
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
.Trash-1000
in the root of that drive, if it doesn't exist already
Jan 30, 2018 at 6:06
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
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
0777
a.k.a. “please-hack-my-system-and-destroy-my-data” permissions for no apparent reason! There's almost never a reason to to that because it can be avoided with more sensible modifications like changing (group) ownership. In this case a sticky folder, i. e. 1777
permissions, would be an acceptable solution for home use. -1
Oct 4, 2016 at 17:13
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.
0777
a.k.a. “please-hack-my-system-and-destroy-my-data” permissions for no apparent reason! There's almost never a reason to to that because it can be avoided with more sensible modifications like changing (group) ownership. -1
Nov 1, 2016 at 11:34