Bug 385906 - Cannot change the icon of encrypted vault folders
Summary: Cannot change the icon of encrypted vault folders
Status: RESOLVED FIXED
Alias: None
Product: Plasma Vault
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Ivan Čukić
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-18 13:03 UTC by avlas
Modified: 2018-07-24 08:26 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description avlas 2017-10-18 13:03:48 UTC
I'd like to specify a non-default icon for the encrypted folders (I try to set it manually to the folder-locked icon, so there is the effect of locked vs unlocked folders according to status). However, this creates a hidden .directory file inside the encrypted folder, after which it is not possible to decrypt the folder anymore (even though no error or warning is triggered), I assume because the folder has some content inside already, and decryption fails. This can be easily workarounded by deleting the hidden .directory file, that is coming back to the default folder icon.

I know that this is not that important, but still, could we workaround this issue somehow?
Comment 1 cryptodude 2017-10-20 11:38:27 UTC
This may be something that Vault needs to be able to tell Dolphin about using some .directory file in the Vaults dir.

The file essentially would tell dolphin that subdirs are mountpoints and no files should be created in there while unmounted.

On the other hand, Vault should be smarter and test if its mounted and if not, mount it.
Comment 2 avlas 2017-10-20 13:03:29 UTC
Cannot Vault be smart enough to check if the only content is the ".directory" file just go ahead and mount it anyways? What would be the problem, perhaps that the original .directory would be lost?

This could be workarounded perhaps by moving the original ".directory" file to a temporal destination before mounting, and then move it back right after unmounting.

Not sure though if this would be considered a good solution.
Comment 3 Ivan Čukić 2017-10-23 22:16:46 UTC
Fuse (used by cryfs, encfs, etc.) does not want to use a non-empty mount point. It can be overridden, but I really do not see this as a valid use-case for doing a force-mount.
Comment 4 avlas 2017-10-23 23:16:14 UTC
Fair enough.

Would be good to raise a notification of the underlying reason why mounting was unsuccessful though, so the user knows what is going on.
Comment 5 Ivan Čukić 2017-10-24 08:35:31 UTC
When you try to mount, and when it fails, you should get a message in the newly opened password entry dialogue that "The mount point directory is not empty, refusing to open the vault".
Comment 6 avlas 2017-10-24 10:10:41 UTC
Nice! 

Is this something recently added? Asking because I don't see that behavior in plasma 5.11.1 (plasma-vault 5.11.1-0neon+16.04+xenial+build5)
Comment 7 avlas 2017-10-24 10:15:39 UTC
To be more specific... When mounting fails in my system, there is no newly opened password entry dialogue, it just fails quietly.
Comment 8 Ivan Čukić 2017-10-29 12:15:24 UTC
What backend did you use?
Comment 9 Ivan Čukić 2017-10-29 12:16:40 UTC
(it is not new - the password dialogue should not close on error)
Comment 10 avlas 2017-10-29 12:33:32 UTC
> What backend did you use?

I use CryFS.

> (the password dialogue should not close on error)

Ok, then. The password dialogue does close in my system.

(Using:  ii  plasma-vault  5.11.2-0neon+16.04+xenial+build6)
Comment 11 Ivan Čukić 2018-03-07 22:38:41 UTC
Can you re-test the latest version?
Comment 12 avlas 2018-03-08 19:41:42 UTC
(In reply to Ivan Čukić from comment #11)
> Can you re-test the latest version?

It works now. Thanks!
Comment 13 avlas 2018-03-08 20:16:18 UTC
Sorry I talked too fast. I almost forgot what the issue was about and the test I did was not proper (I just tested introducing a wrong password, and the dialog remained opened and properly informed about the incorrect password).

But this issue was about trying to mount the content on a non-empty folder. To test this, I modified the icon of that folder to put one with a locker. That generates a .directory file so that folder is not empty anymore.

I think the issue is still present because when I tried to mount, no error was reported, the dialog disappeared, and dolphin was open, but no content was mount (just the .directory that was created because of the folder icon change).

To mount against a folder that only contains a .directory file was not considered a plausible use-case, which is fair. However, failing to mount should be reported, which is not yet the case.

I reopened the issue according to the new test I made. I hope it is ok.
Comment 14 avlas 2018-03-08 20:19:05 UTC
Tested in plasma-vault 5.12.2 (KDE neon User Edition)
Comment 15 Ivan Čukić 2018-03-10 09:32:25 UTC
Ok, great. I know what the problem is. Will have to wait for the new release of CryFS and Plasma for this to be fixed though.
Comment 16 avlas 2018-03-10 12:42:16 UTC
Sounds good, thanks!
Comment 17 Ivan Čukić 2018-07-23 15:55:33 UTC
This is fixed in 5.13 and cryfs 0.9.9
Comment 18 avlas 2018-07-24 08:26:09 UTC
Thanks! 

I'll check this out as soon as cryfs 0.9.9 is available in my system...

(In reply to Ivan Čukić from comment #17)
> This is fixed in 5.13 and cryfs 0.9.9