I am trying to delete files in Nautilus and every time I try to delete one it always gives me this message:
Cannot move file to trash, do you want to delete immediately?
Then it gives me several questions. All I want is that when I press Delete in the keyboard, it sends it automatically to the trash can. Not to ask me every time.
The problem relates to NTFS partitions, external drives but also include Linux filesystems.
What are the reasons for nautilus beeing not able to move to trash?
Best Answer
(About removable media, not the case from the user since it was a bug solved with an update)
This behaviour happens because when the drive is mounted you are not considered the owner so a trash bin cannot be created. No uid or gid was assigned and since a trash bin folder cannot be created in the drive you are only offered the choice to delete the files automatically.
In that case you have 2 options: cut the files in to your Linux file system and delete them there (which defeats the purpose of press delete and the files are deleted) or make sure you are assigned the correct permissions when mounting the drive.
Create a new rule for your auto-mounted drives with these lines, use your favorite text editor for that
Reboot your computer and your ntfs drives will be mounted using this custom rule, to change the permissions for the mounted drive have a look at the line
$env{mount_options},gid=46,dmask=000,fmask=111,utf8"
, the optiongid=46
should mount the ntfs drive with group privileges (46(plugdev)
is the group that allows a user to mount a drive in Ubuntu),fmask
anddmask
settings to write, create, delete files/folders on the drive.Change it according to needs. You will need to sort out other file systems by yourself according to to each type but this should get your started.
(Source for the
udev
rule)