trashimpl: Fix slow trashing on remote mounts with UID mapping

It is one of these days, when I say to myself: "Fine, I'll do it myself" 😄

When an NFS share is mounted with all_squash and anonuid != local user id, the current implementation will instead move files to the home trash. That is super annoying and makes the trash function virtually unusable for large files.

Using access() like it is done above for checking if an admin-created /.Trash directory is writable would fix this, as access() also asks the NFS server if, considering all options, this directory is a-ok for writing. (But of course the kernel handles this accordingly for all other filesystems).

This does not violate the spec as it doesn't state that the directory should be owned by the user, it must only be accessible.

BUG:506755

Edited by Méven Car

Merge request reports

Loading