Trash support with FUSE

Been very busy working on a new lab build for the university. Deciding how to mount home directories is always challenging. NFS is not secure enough, I don’t like the current implementation of Kerberos support in NFSv4, with tickets being machine based. Until recently we have been using SMB with PAM_MOUNT but of course permissions were always monged, and smb shares have their own security concerns. I wanted home directory mounts which required user authentication and were secure. What I have settled for is SSHFS.

SSHFS is a FUSE based filesystem which basically uses sftp for the backend. There is no quota, flock or disk free support, and it is kinda slow, but it is a better solution than samba and it meets all of my security concerns. Getting it to work was fun, first trying pam_mount and then finally getting it to work with pam_script and a Perl::Expect script, I might post more on that later.

But once home directories were mounting successfully I discovered the Trash icon was behaving strangely. I could move data to Trash, and it would be moved to the .trash directory, but the Trash icon would still appear empty, and I could never empty the Trash folder.

It turns out the gnome-vfs package explicitly states all the filesystems it supports in the code. Fuse was not mentioned. Adding the line:

{ "fuse" , N_("FUSE Volume"), 1 },

to:

libgnomevfs/gnome-vfs-filesystem-type.c

and recompiling fixed the problem.

One thought on “Trash support with FUSE”

Leave a Reply

Your email address will not be published. Required fields are marked *