Skip to content

Thunar permanently deletes files/directories without warning

Version information

  • Thunar 4.20.2
  • Fedora 42

Steps to reproduce

In this example, we make a new filesystem, add it to fstab, mount it, then create a new folder on it and delete it again. Thunar does NOT show a confirmation when deleting the folder, and the folder is NOT shown in Trash, either. It is permanently deleted without warning.

  1. fallocate -l 1G filesystem.bin
  2. LOOPDEV=$(sudo losetup -f --show filesystem.bin)
  3. sudo mkfs.ext4 "$LOOPDEV"
  4. echo "$LOOPDEV /mnt ext4 defaults 0 0" | sudo tee -a /etc/fstab
  5. sudo systemctl daemon-reload
  6. sudo mount -a
  7. sudo chown $USER /mnt
  8. sudo chmod 0775 /mnt
  9. As normal user, run: thunar /mnt
  10. Now create a new folder using Thunar.
  11. Delete the new folder. Notice that there's no confirmation.
  12. Go to the Trash. Notice that the new folder is NOT listed. It was permanently deleted.

IMPORTANT: The problem happens only if the volume was mounted via fstab. If we DON'T add the volume to fstab and instead let Thunar mount it (by double-clicking the volume), and we then delete a new folder, it does correctly show up in Trash.

If I remember correctly, this was NOT reproducible with Fedora 41 and Thunar 4.18.11. That version of Thunar correctly warns that the folder will be permanently deleted.

Expected outcome

Either Thunar should move the file/directory to the Trash, or it should show a warning that the file/directory will be permanently deleted.