You are not logged in.

#1 2017-01-21 16:35:42

mindless
Member
Registered: 2017-01-21
Posts: 29

Can't delete files from Thunar on disks mounted with fstab

Hi, I have an issue which occurs only from the gui and not from the terminal. I can't delete files/folders on disks which were mounted with fstab. I have multiple drives and 2 mounted automaticly with fstab

 sdc1 and sde1

.
When I delete things from the terminal, everything works perfeclty, but from Thunar, I get this error (translated from french) :

Unable to find or create the trash directory for (the file I'm trying to delete).

Here is my mount list :

+zsh:1:>mount -l
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=8179764k,nr_inodes=2044941,mode=755)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
/dev/sdb3 on / type ext4 (rw,noatime,discard,data=ordered) [root]
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=32,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
/dev/sdb1 on /boot/efi type vfat (rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro) [boot]
/dev/sdb4 on /home type ext4 (rw,noatime,discard,data=ordered) [home]
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sde1 on /media/files type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096) [Files]
/dev/sdc1 on /media/workspace type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096) [Workspace]
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=1636864k,mode=700,uid=1000,gid=100)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
/dev/sda2 on /run/media/mindless/01D214488AF9C030 type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
/dev/sdd1 on /run/media/mindless/Photo type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2) [Photo]

And here are the lines in /etc/fstab :

UUID=0085ddc4-ed91-4041-904e-ee9826944593 /home ext4 defaults,noatime,discard 0 0
UUID=9f933dd5-8b8b-4140-858b-c2a89c074568 / ext4 defaults,noatime,discard 0 1
UUID=D422-E328 /boot/efi vfat defaults,noatime 0 0
UUID=151f74ba-7829-4af1-9fda-86bbfb46920d swap swap defaults 0 0
/dev/sdc1 /media/workspace ntfs defaults 0 0
/dev/sde1 /media/files ntfs defaults 0 0

The concerned drives are the 2 at the bottom.
For the other drives, I mount them when I try to access them from Thunar, which ask me my password, and the operations work perfectly.

I can't even delete the files that I create.

The code that launch my File Finder:

exo-open --launch FileManager %u

Do you have an idea why it is doing this ?

Offline

#2 2017-01-21 18:13:44

adesh
Member
Registered: 2016-10-05
Posts: 167

Re: Can't delete files from Thunar on disks mounted with fstab

You need to install gvfs to use the 'Trash' functionality.
Otherwise you can use 'Shift' + 'Delete' keys for permanent (like rm) deletion.

Offline

#3 2017-01-22 09:05:41

mindless
Member
Registered: 2017-01-21
Posts: 29

Re: Can't delete files from Thunar on disks mounted with fstab

adesh wrote:

You need to install gvfs to use the 'Trash' functionality.
Otherwise you can use 'Shift' + 'Delete' keys for permanent (like rm) deletion.

This doesn't solve the problem sad

Offline

#4 2017-01-22 14:04:02

seth
Member
Registered: 2012-09-03
Posts: 51,046

Re: Can't delete files from Thunar on disks mounted with fstab

strace thunar. it will try to create some ".Trash" directory (or similarily named) on the ntfs device but your use lacks writing permissions in that location (i guess the devices root path)
=> create such directory and ensure you end up having write permissions there.

Alternatively, configure thunar to simply delete files, avoiding any trashcan step OR (if possible) to use a dedicated trash path BUT that will inevitably cause a (slow) copy/delete instead of just altering the inode link ("move") if the trash path is not on the same device.

Offline

#5 2017-01-22 20:39:25

mindless
Member
Registered: 2017-01-21
Posts: 29

Re: Can't delete files from Thunar on disks mounted with fstab

Yes that was this, so to enable my user to have the read and write permissions, I added

umask=0022,gid=XXXX,uid=XXX

on each drive secondary drives in

/etc/fstab

. And I got gid and uid with the

id

command. See more here.

Offline

#6 2017-01-22 20:45:42

seth
Member
Registered: 2012-09-03
Posts: 51,046

Re: Can't delete files from Thunar on disks mounted with fstab

ntfs has POSIX access permission support, ie. you do not *have* to operate on umask (like eg. on non user-mounted vfat) - while you *can* (on a typical single-user desktop. in a multiuser environment, your approach will not suffice)

Offline

#7 2017-01-23 17:09:57

mindless
Member
Registered: 2017-01-21
Posts: 29

Re: Can't delete files from Thunar on disks mounted with fstab

seth wrote:

ntfs has POSIX access permission support, ie. you do not *have* to operate on umask (like eg. on non user-mounted vfat) - while you *can* (on a typical single-user desktop. in a multiuser environment, your approach will not suffice)

Ok, so what should I do ?

Offline

#8 2017-01-23 21:14:46

seth
Member
Registered: 2012-09-03
Posts: 51,046

Re: Can't delete files from Thunar on disks mounted with fstab

Probably nothing, because thunar will now have created a .trash directory with the proper owner/permissions.

Offline

Board footer

Powered by FluxBB