Bug 70831
Summary: | Bind mount doesn't allow to trash files and directories | ||
---|---|---|---|
Product: | File System | Reporter: | dbzix (dbz.gml) |
Component: | VFS | Assignee: | fs_vfs |
Status: | RESOLVED ANSWERED | ||
Severity: | high | CC: | adobriyan, alan, c.buhtz, hans, netbox253, szg00000, toto_23 |
Priority: | P1 | ||
Hardware: | x86-64 | ||
OS: | Linux | ||
Kernel Version: | Debian 3.11.8-1 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
dbzix
2014-02-19 11:02:43 UTC
I also found this old bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=698640 Could you please check this and give me right direction? Thank you once again! rename(2) doesn't cross mountpoints. That's how Unix always worked. dup #14849 Alexey, Okay, so is this kernel issue or not? What about my question about bind-mounted directories? Does it relate to code provided above? Thank you in advance! You can not delete files to Trash because code internally does rename(2) which doesn't work because rename formally crosses mountpoint. Code can be improved, namely; * try rename(2) * if EXDEV, copy+unlink kernel can be improved by option to allow rename to succeed if rename crosses filesystem not mountpoint, but userspace code would have the same problem: file and Trash on another fs. Alexey, thanks for answer! But this means that one cannot use bind-mounted directories 'normally', because there is no way to 'trash' files from such places, and the only way to delete files is permanent deleting without any possibility to restore such data. And there is not much sense of using bind-mounted directories because of that obscure behavior. Am I right or I missed something? Your best bet is to file a bug against your desktop environment vendor and ask to implement EXDEV:copy+unlink fallback. Thanks! Did someone opened a "bug against [any] desktop environment"? Indeed, did someone open a bug against any desktop environment? Ubuntu is force-feeding snap to its users and snap requires mounted home directories (rather than symlinks). I hitted this recently. Bug opened against Xfce. https://gitlab.xfce.org/xfce/thunar/-/issues/714 |