Trash-applet : when emptying, follows link when link and source are on different partitions

Bug #1872197 reported by Coeur Noir
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
budgie-extras (Ubuntu)
Fix Released
High
fossfreedom
Eoan
Fix Released
High
fossfreedom
Focal
Fix Released
High
fossfreedom

Bug Description

[Impact]

 * Budgie Trash Applet is an optional applet a user can add to their desktop.
 * The applet has a feature to empty the current local drive trash can.
 * Where users have folders located on additional hard-drives some people
   access those folders via a symbolic link.
   If the user deletes the symbolic link to a folder located on another
   drive/partition, the trash-can appears full i.e. ready to be emptied.
   Emptying the trash can will delete the symbolic link - but more importantly will delete everything that the symbolic link was pointing to.

 * This upload ensures that the trash-can empty code respects the "do not follow symbolic link" GLIB File request so that it only processes the symbolic link.

 * There is no impact on other desktop interfaces - this applet only works on the budgie-desktop

[Test Case]

 * Requests a symbolic link to a folder located on another hard-drive or partition.
 * In that folder include test files.
 * Delete the symbolic link
 * Choose the applet empty trash can option
 * Examine if the symbolic link has been removed - yes is success
 * Examine the folder and its contents that the symbolic link was originally pointing to - the folder and its contents are NOT deleted. This denotes success

[Regression Potential]

 * There are multiple ways symbolic links can be used - nested within folders pointing to various other places. There is a regression potential that not all symbolic link use cases have been caught.

 * However saying that - the basic use-case outlined here has been tested by the OP via a test PPA on 19.10. This is an SRU to formalise what has already been tested and proven to work.

 * For budgie, emptying the trash-can via Nemo works as an alternative solution - the trash-can is an optional feature that can be removed if causing additional detrimental issues.

 * Testers MUST have good backups of their system to ensure if any regressions can be mitigated through restores.

 * There is no regression potential for other desktop interfaces - the applet is only applicable to budgie.

 * It is an optional feature to the desktop and thus users who do not use
   the applet will not be exposed to any potential regression in this area.

[Other Info]

 * N/A

-----

Original description

See https://discourse.ubuntubudgie.org/t/trash-applet-when-emptying-follow-links/3330 for reference.

hi,

confirmation needed.

I suspect trash applet to delete not only symlink but also source file or folder to that link.

create a symlink to a folder containing many things.

Put it in trash.

Use trash-applet to empty trash → original folder and its content are deleted.

Create another symlink.

Put it in trash.

Use Nemo to empty trash → only link is deleted, and not original source.

Does anyone confirm ? If so, that sounds like a bug as I don’t expect source to be deleted when deleting a link.

ProblemType: Bug
DistroRelease: Ubuntu 19.10
Package: budgie-trash-applet 0.10.1-0ubuntu3
ProcVersionSignature: Ubuntu 5.3.0-46.38-generic 5.3.18
Uname: Linux 5.3.0-46-generic x86_64
ApportVersion: 2.20.11-0ubuntu8.8
Architecture: amd64
CurrentDesktop: Budgie:GNOME
Date: Sat Apr 11 16:30:47 2020
InstallationDate: Installed on 2020-03-22 (19 days ago)
InstallationMedia: Ubuntu-Budgie 19.10 "Eoan Ermine" - Release amd64 (20191017)
SourcePackage: budgie-extras
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Coeur Noir (coeur-noir) wrote :
Changed in budgie-extras (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → fossfreedom (fossfreedom)
Changed in budgie-extras (Ubuntu Eoan):
status: New → In Progress
importance: Undecided → High
assignee: nobody → fossfreedom (fossfreedom)
Revision history for this message
Coeur Noir (coeur-noir) wrote :

Sorry for suggesting more work but as 18.04 is LTS supported until 2021 I guess, Bionic may be added ?

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package budgie-extras - 1.0.1-2

---------------
budgie-extras (1.0.1-2) unstable; urgency=medium

  * Bug-fix release
    - Do not follow symlinks pointing to other partitions when emptying the
      trash-can otherwise the location pointed to will also be deleted
      (LP: #1872197)

 -- David Mohammed <email address hidden> Sat, 11 Apr 2020 16:26:57 +0100

Changed in budgie-extras (Ubuntu Focal):
status: In Progress → Fix Released
description: updated
Revision history for this message
fossfreedom (fossfreedom) wrote :

trashcan.debdiff can be applied to the existing eoan package.

I have already dput this into the eoan upload queue for the SRU.

This has been patched in focal and released.

description: updated
Changed in budgie-extras (Ubuntu Bionic):
status: New → Invalid
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Coeur, or anyone else affected,

Accepted budgie-extras into eoan-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/budgie-extras/0.10.1-0ubuntu4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-eoan to verification-done-eoan. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-eoan. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in budgie-extras (Ubuntu Eoan):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-eoan
Revision history for this message
Coeur Noir (coeur-noir) wrote :

Testing with budgie-trash-applet 0.10.1-0ubuntu4 from eoan-proposed.

Have created folders containing files on two different partitions and links to these folders ( ctrl+M in Nemo ).
⋅ a link on partition A to a folder in partition B
⋅ a link on partition B to a folder in partition A

→ deleting the links through trash-applet only deletes the links and not the source files, so this is fixed.

( what remains, unability to restore through trash-applet if file was not on the same partition as /home/$USER which is another story )

see https://discourse.ubuntubudgie.org/t/trash-applet-when-emptying-follow-links/3330/26?u=coeur-noir and https://discourse.ubuntubudgie.org/t/trash-applet-when-emptying-follow-links/3330/27?u=coeur-noir for pictures.

Revision history for this message
fossfreedom (fossfreedom) wrote :

Obs re restore is a separate issue. Please raise a separate issue.

Thx for verifying. As per the request the tags have been updated to reflect your testing.

tags: added: verification-done verification-done-eoan
removed: verification-needed verification-needed-eoan
Mathew Hodson (mhodson)
no longer affects: budgie-extras (Ubuntu Bionic)
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for budgie-extras has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package budgie-extras - 0.10.1-0ubuntu4

---------------
budgie-extras (0.10.1-0ubuntu4) eoan; urgency=medium

  * Bug-fix release
    - Do not follow symlinks pointing to other partitions when emptying the
      trash-can otherwise the location pointed to will also be deleted
      (LP: #1872197)

 -- David Mohammed <email address hidden> Sat, 11 Apr 2020 10:24:38 +0100

Changed in budgie-extras (Ubuntu Eoan):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.