Summary: | Restore of Vaults fail | ||
---|---|---|---|
Product: | [Plasma] Plasma Vault | Reporter: | Justin <kdebugs.cmrck> |
Component: | general | Assignee: | Ivan Čukić <ivan.cukic> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | nate |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Kubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Justin
2020-04-30 06:09:28 UTC
I debugged this with Justin and we think we migrated all the old files into the correct locations on his mew machine, but the Vaults applet was still not showing his existing vault. > I debugged this with Justin and we think we migrated all the old files into the
This is not all that helpful :)
1. Can you try creating a new vault (with the same backend as the last one) and checking that it works at all?
2. What does the following command return?
qdbus --literal org.kde.kded5 /modules/plasmavault availableDevices
3. Open the vaultrc file and check whether the newly created vault is there
4. Is the old vault present in the config?
5. Check that the encrypted directory location (path in the square brackets) and the path specified in mountPoint exist
6a. What is the value of activities field for that vault?
6b. If the field is not empty, what does this command return:
kactivities-cli --list-activities
7. Can you mount the old vault manually using encfs/cryfs from command line?
I'm marking this as needsinfo - I don't expect it to be a vault issue per se, but let's triage this and make it working anyhow.
Hello Ivan, I created a new vault called 'Safe'. I attempted to place it in the same directory as my previous vault called 'Vault'at /home/anarcho/Personal/Vault It said the directory was not empty. I clicked Ok and it created 'Safe' at /home/anarcho/Vault. My previous vault still would not show in the taskbar icon. I ran the command: anarcho@LuNoHo:~$ qdbus --literal org.kde.kded5 /modules/plasmavault av [Argument: a(sssqsasb) {[Argument: (sssqsasb) "Safe", "/home/anarcho/.lt/Safe.enc", "", 2, "", {}, false], [Argument: (sssqsasb) "Vault", "/hoe/plasma-vault/Vault.enc", "", 2, "", {"5e847ac8-3735-4647-ad07-ac753d5 anarcho@LuNoHo:~$ I did a sudo apt update. Trying to open the old vault via Dolphin, brought a pop up saying cryfs needed to be updated. I clicked ok. I was then able to access the vault! 'Safe' appears under the taskbar icon but 'Vault' seems to not always be there, yet I can access it through Dolphin. I ran the command again: anarcho@LuNoHo:~$ anarcho@LuNoHo:~$ qdbus --literal org.kde.kded5 /modules/plasmavault anarcho@LuNoHo:~$: command not found anarcho@LuNoHo:~$ qdbus --literal org.kde.kded5 /modules/plasmavault signal void org.kde.plasmavault.hasOpenVaultsChanged(bool hasOpenVaults) signal void org.kde.plasmavault.vaultAdded({D-Bus type "(sssqsasb)"} vaultData) signal void org.kde.plasmavault.vaultChanged({D-Bus type "(sssqsasb)"} vaultData) signal void org.kde.plasmavault.vaultRemoved(QString device) method {D-Bus type "a(sssqsasb)"} org.kde.plasmavault.availableDevices() method void org.kde.plasmavault.closeAllVaults() method void org.kde.plasmavault.closeVault(QString device) method void org.kde.plasmavault.configureVault(QString device) method void org.kde.plasmavault.deleteVault(QString device, QString name) method void org.kde.plasmavault.forceCloseAllVaults() method void org.kde.plasmavault.forceCloseVault(QString device) method bool org.kde.plasmavault.hasOpenVaults() method void org.kde.plasmavault.openVault(QString device) method void org.kde.plasmavault.openVaultInFileManager(QString device) method void org.kde.plasmavault.requestImportVault() method void org.kde.plasmavault.requestNewVault() method void org.kde.plasmavault.updateStatus() signal void org.freedesktop.DBus.Properties.PropertiesChanged(QString interface_name, QVariantMap changed_properties, QStringList invalidated_properties) method QDBusVariant org.freedesktop.DBus.Properties.Get(QString interface_name, QString property_name) method QVariantMap org.freedesktop.DBus.Properties.GetAll(QString interface_name) method void org.freedesktop.DBus.Properties.Set(QString interface_name, QString property_name, QDBusVariant value) method QString org.freedesktop.DBus.Introspectable.Introspect() method QString org.freedesktop.DBus.Peer.GetMachineId() method void org.freedesktop.DBus.Peer.Ping() Thanks for the help Ivan (and Nate)! You may mark this as solved and close if you think there is nothing more to explore! If I'm not mistaken (some parts are missing in you response, so I'm making an educated guess :) ), you haven't restored activity configuration and your vault is assigned to an activity with an id of "5e847ac8-3735-4647-ad07-ac753d5" which no longer exists. Try to do this - open konsole and: killall kded5 cd ~/.config mv plasmavaultrc plasmavaultrc.backup grep -v 5e847ac8-3735-4647 plasmavaultrc.backup > plasmavaultrc kded5 & Ah of course, I forgot the activity integration. If you're right though, then IMO there's a real bug here. When a user restores their system, their vaults shouldn't disappear due to the implementation detail that the UUID of the activity they were assigned to on the old system is no longer valid on the new system. A vault becoming inaccessible after restoring from backup amounts to data loss. Incomplete backup restoration is not something I can cover in the general case. But, I have been planning to handle missing activities more gracefully. The usual mantra for encryption is that data loss is preferred to a data leak, but I guess that the 'leak' in this case is not a real problem - if an attacker has system access, they can access the rc file and see the list of all existing vaults regardless of what is shown in the applet. Git commit 2befe1ffd7d75be3603e38270c5db2847083f292 by Ivan Čukić. Committed on 04/05/2020 at 14:39. Pushed by ivan into branch 'master'. Unassign activity from vault on activity deletion Summary: CCBUG: 420784 Reviewers: ngraham, davidedmundson, mart Reviewed By: mart Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D29379 M +60 -14 kded/service.cpp M +2 -0 kded/service.h https://commits.kde.org/plasma-vault/2befe1ffd7d75be3603e38270c5db2847083f292 Thanks Ivan! So is there anything more we can do here? (In reply to Ivan Čukić from comment #4) > If I'm not mistaken (some parts are missing in you response, so I'm making > an educated guess :) ), you haven't restored activity configuration and your > vault is assigned to an activity with an id of > "5e847ac8-3735-4647-ad07-ac753d5" which no longer exists. > > Try to do this - open konsole and: > killall kded5 > cd ~/.config > mv plasmavaultrc plasmavaultrc.backup > grep -v 5e847ac8-3735-4647 plasmavaultrc.backup > plasmavaultrc > kded5 & This worked! Thanks Ivan! I now also have an extra option 'Configure Vault' @Nate Nothing else to do here I think. Marking as resolved. @Justin No problem, glad to be of help! If I'm reading that commit correctly, the activity's UUID will be removed from the config file when the activity is deleted, but it will still be there if the system crashes and the config file is restored from backup, right? If so, maybe on launch, it could check to see if the UUID is valid, and if not, automatically remove it? It also does it on startup - just async as it needs to wait for the activities list to be loaded from kamd. Perfect! Let's call this fixed, then. :) |