Bug 462056 - KDE can use only system SSD partition for trash, mounted NTFS one is not available in trash settings
Summary: KDE can use only system SSD partition for trash, mounted NTFS one is not avai...
Status: RESOLVED NOT A BUG
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: Trash (show other bugs)
Version: 5.100.0
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-20 10:40 UTC by Eugene
Modified: 2022-12-06 15:48 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene 2022-11-20 10:40:05 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
KDE can use only system SSD partition for trash, mounted NTFS one is not available in trash settings

STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT
files are being moved to Trash on system SSD

EXPECTED RESULT
files to be moved to created Trash folder on HDD

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.26.3
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2022-11-29 22:38:30 UTC
Is the NTFS disk mounted read/write, or read-only?
Comment 2 Eugene 2022-11-30 11:48:48 UTC
Hello! It"s been mounted with gdisks with parameters 
nosuid,nodev,nofail,x-gvfs-show,  read/write works well in this case. If 
I remove this line from fstab and mount drive at boot - trash settings 
can see this partition and use it for moving deleted files accordingly. 
This situation I can see on EndeavourOS too.

On 11/30/22 01:38, Nate Graham wrote:
> https://bugs.kde.org/show_bug.cgi?id=462056
>
> Nate Graham <nate@kde.org> changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                   CC|                            |kdelibs-bugs@kde.org,
>                     |                            |nate@kde.org
>             Assignee|unassigned-bugs@kde.org     |faure@kde.org
>              Version|unspecified                 |5.100.0
>              Product|kde                         |frameworks-kio
>           Resolution|---                         |WAITINGFORINFO
>               Status|REPORTED                    |NEEDSINFO
>            Component|general                     |Trash
>
> --- Comment #1 from Nate Graham <nate@kde.org> ---
> Is the NTFS disk mounted read/write, or read-only?
>
Comment 3 Nate Graham 2022-12-01 20:50:05 UTC
Indeed, the trash code is picky about which args a disk is mounted with to be counted as a volume with its own trash, because the functionality needs some special mount options to work properly. As you've discovered, some of those parameters break this and falling back to the default settings makes it work. So I would recommend doing that.
Comment 4 Eugene 2022-12-01 22:37:57 UTC
Hello! The problem is there if i mount the drive even with all the same 
args manually as the default one. Basically with the line in fstab trash 
doesn't work for the partition

On 12/1/22 23:50, Nate Graham wrote:
> https://bugs.kde.org/show_bug.cgi?id=462056
>
> Nate Graham <nate@kde.org> changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>               Status|NEEDSINFO                   |RESOLVED
>           Resolution|WAITINGFORINFO              |NOT A BUG
>
> --- Comment #3 from Nate Graham <nate@kde.org> ---
> Indeed, the trash code is picky about which args a disk is mounted with to be
> counted as a volume with its own trash, because the functionality needs some
> special mount options to work properly. As you've discovered, some of those
> parameters break this and falling back to the default settings makes it work.
> So I would recommend doing that.
>
Comment 5 Nate Graham 2022-12-02 17:56:58 UTC
You said:
> If I remove this line from fstab and mount drive at boot - trash settings 
> can see this partition and use it for moving deleted files accordingly. 
I interpreted that to mean that it was working. Is that incorrect?
Comment 6 Eugene 2022-12-02 22:43:43 UTC
If I mount the partition manually at each boot - trash settings see it, 
if i use fstab automount with all the same aguments that terminal 
"mount" command gives me - the partition is not available in trash settings

On 12/2/22 20:56, Nate Graham wrote:
> https://bugs.kde.org/show_bug.cgi?id=462056
>
> --- Comment #5 from Nate Graham <nate@kde.org> ---
> You said:
>> If I remove this line from fstab and mount drive at boot - trash settings
>> can see this partition and use it for moving deleted files accordingly.
> I interpreted that to mean that it was working. Is that incorrect?
>
Comment 7 Nate Graham 2022-12-05 18:10:44 UTC
Then don't use fstab automount; if you want it to automount, use KDE's own automounting system in System Settings > Removable Storage > Removable Devices which should mount the disk with the correct options to make trash support work.
Comment 8 Eugene 2022-12-05 19:48:38 UTC
Yes sir! That's exactly what i do though, but the problem is that i have 
to type password after boot to mount it and always reset the disc usage 
widget because it loads before the mount happens. So the solution is not 
replacement for the fstab line.

On 12/5/22 21:10, Nate Graham wrote:
> https://bugs.kde.org/show_bug.cgi?id=462056
>
> --- Comment #7 from Nate Graham <nate@kde.org> ---
> Then don't use fstab automount; if you want it to automount, use KDE's own
> automounting system in System Settings > Removable Storage > Removable Devices
> which should mount the disk with the correct options to make trash support
> work.
>
Comment 9 Nate Graham 2022-12-05 20:04:22 UTC
> i have to type password after boot to mount it
That's a bug in your distro's polkit rules. I can reproduce it. It should be fixed there, rather than worked around. Can you file a bug report at https://bugzilla.redhat.com/ and paste the link to it here?

> always reset the disc usage widget because it loads before the mount happens
That's a different bug, similar to Bug 441556, but not quite the same thing. Can you file a new bug report for it and paste the link to it here?


As a general matter, when you have a problem, you should file a bug on the problem. If you seek a workaround, and the workaround has problems too, we're just going to ask you what the original problem is that you were trying to work around. :) We want to fix the original bug that caused yu to seek a workaround, not bugs caused by the workaround.
Comment 10 Eugene 2022-12-05 23:43:48 UTC
The original bus is that automount with fstab using all the same 
parameters that "mount" command gives me in terminal makes trash 
workable only on root partition, if use automount through system 
parameters - I have to type password, the rest is just side effects of it

On 12/5/22 23:04, Nate Graham wrote:
> https://bugs.kde.org/show_bug.cgi?id=462056
>
> --- Comment #9 from Nate Graham <nate@kde.org> ---
>> i have to type password after boot to mount it
> That's a bug in your distro's polkit rules. I can reproduce it. It should be
> fixed there, rather than worked around. Can you file a bug report at
> https://bugzilla.redhat.com/ and paste the link to it here?
>
>> always reset the disc usage widget because it loads before the mount happens
> That's a different bug, similar to Bug 441556, but not quite the same thing.
> Can you file a new bug report for it and paste the link to it here?
>
>
> As a general matter, when you have a problem, you should file a bug on the
> problem. If you seek a workaround, and the workaround has problems too, we're
> just going to ask you what the original problem is that you were trying to work
> around. :) We want to fix the original bug that caused yu to seek a workaround,
> not bugs caused by the workaround.
>
Comment 11 Nate Graham 2022-12-06 00:06:57 UTC
(In reply to Eugene from comment #10)
> The original bus is that automount with fstab using all the same 
> parameters that "mount" command gives me in terminal makes trash 
> workable only on root partition, if use automount through system 
> parameters - I have to type password, the rest is just side effects of it

And that's not a bug, it's expected behavior since you need to use special mount flags to make trash functionality work. The `mount` command doesn't know what those are, so it's expected that you use the KDE automount system instead.

If using the KDE automount system is causing other bugs (e.g. having to enter your password on boot or disk space widgets not working until plasmashell is restarted) those are the bugs that need to be fixed. Can you file bug reports for them, please?
Comment 12 Eugene 2022-12-06 13:52:54 UTC
OK i will report that automount with KDE setting cause need for password 
after boot to mount the device. The widget problem is expected because 
it loads on login and after that i type password a mount the device (it 
just don't give me information about it because I mount it after widget 
loads)

On 12/6/22 03:06, Nate Graham wrote:
> https://bugs.kde.org/show_bug.cgi?id=462056
>
> --- Comment #11 from Nate Graham <nate@kde.org> ---
> (In reply to Eugene from comment #10)
>> The original bus is that automount with fstab using all the same
>> parameters that "mount" command gives me in terminal makes trash
>> workable only on root partition, if use automount through system
>> parameters - I have to type password, the rest is just side effects of it
> And that's not a bug, it's expected behavior since you need to use special
> mount flags to make trash functionality work. The `mount` command doesn't know
> what those are, so it's expected that you use the KDE automount system instead.
>
> If using the KDE automount system is causing other bugs (e.g. having to enter
> your password on boot or disk space widgets not working until plasmashell is
> restarted) those are the bugs that need to be fixed. Can you file bug reports
> for them, please?
>
Comment 13 Nate Graham 2022-12-06 14:44:51 UTC
Thanks. Because the password issue is a Fedora bug, can you file it at https://bugzilla.redhat.com? And then please paste the link here as I'm interested in having that fixed as well. :)
Comment 14 Eugene 2022-12-06 15:38:54 UTC
I'm sorry I don't use Fedora, I use EndeavourOS

  On 12/6/22 17:44, Nate Graham wrote:
> https://bugs.kde.org/show_bug.cgi?id=462056
>
> --- Comment #13 from Nate Graham <nate@kde.org> ---
> Thanks. Because the password issue is a Fedora bug, can you file it at
> https://bugzilla.redhat.com? And then please paste the link here as I'm
> interested in having that fixed as well. :)
>
Comment 15 Nate Graham 2022-12-06 15:39:58 UTC
Oh sorry. Where did I get the idea you use Fedora? That's odd.
Comment 16 Eugene 2022-12-06 15:46:27 UTC
I don't know sir )) Maybe smb else with similar problem. it's fine I 
understand you discuss stuff with many people at the same time.

On 12/6/22 18:39, Nate Graham wrote:
> https://bugs.kde.org/show_bug.cgi?id=462056
>
> --- Comment #15 from Nate Graham <nate@kde.org> ---
> Oh sorry. Where did I get the idea you use Fedora? That's odd.
>
Comment 17 Nate Graham 2022-12-06 15:48:26 UTC
Oh yeah, do I ever. :)