** Description changed: [SRU] 2.78: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/2166403 [Impact] Snapd <2.78 removed also non-user data during snap removal. [Test Plan] This is sufficiently covered by automated snapd testing: https://github.com/canonical/snapd/pull/17373/changes#diff-a62da667facb537b9411d1f156097e40eb4a030d18260c010b1273d781c43608 + Manual steps for both snapd debs < 2.78 and snapd debs 2.78: + + 1. Install a snap + 2. Mimic that snap's directories by creating: + - /remote/users/not-a-real-user/snap/<snap-name> + - /remote/users/not-a-real-user/snap/<snap-name>/<revision> + - /remote/users/not-a-real-user/snap/<snap-name>/common + - /remote/users/not-a-real-user/snap/<snap-name>/<revision>/test-file + - /remote/users/not-a-real-user/snap/<snap-name>/common/test-file + 3. Remove the snap + 4. Verify that for snapd < 2.78 the files get removed and remain for snapd 2.78 + [Where problems could occur] Snapd now uses user home directories to determine data deletion, and so will now remove less data than before. - ---original--- snap 2.67 snapd 2.67 series 16 ubuntu 24.10 kernel 6.11.0-14-generic I used the command "snap remove --purge thunderbird" and was very surprised that it removed thunderbird data not only for my user, but also for /home/some_dir (the actual name was different) which was a copy from another system. There was no user whose home directory was /home/some_dir. Apparently, snap removes content from all directories under /home. In my case I was lucky as I didn't need these files anymore, and had them on a different disk. The command was run by root. I have two suggestions or requests. 1. Update documentation (manual page and --help) that 'snap remove' (when run as root or whatever conditions apply) removes data of all users. This is very non-obvious. Normally a command ran by root modifies only system-wide configuration or data. At least documentation for '-- purge' could include a warning. Or even another switch like --handle- user-data, or an interactive confirmation. 2. For 'snap remove' and other commands that modify data of all users, do not modify whichever directories are under /home, at least not by default, but only these directories which belong to a user.
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2106306 Title: snap remove deleting data too eagerly To manage notifications about this bug go to: https://bugs.launchpad.net/snapd/+bug/2106306/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
