Closed rugk closed 3 years ago
Thanks for reporting! Does this also happen, when you disable "Get statistic of file/folder when added" from the Misc tab? Apart from that we don't do anything with the folder you add there. So the issue is probably there.
No it does not happen then. However, it also:
Again, this is not what I'd expect.
IMHO it should check that the path is writable/can be used and show an error hen, if it is not.
Oh forget it, it does happen anyway! (I did not notice, because you don't notice it unless you click somewhere :sweat_smile:) So it freezes and you cannot do anything.
It could also be that the path is not accessible from the flatpak, i.e. /home/…
.
I took a look at reproducing this using the Debian package, to test to see if identical behaviour occurred without Flatpak. "Get statistic of file/folder when added" is enabled.
It looks to me like there is a bug in Vorta's permission checks done when adding sources. I speculate that this may result in a hang when using Flatpak, most likely due to how permissions are blocked through container namespaces and possibly also how apparmor and SELinux (which Fedora uses by default seems to have stronger Mandatory Access Controls than apparmor) extend this to block even more. P.S. IMHO this is a good thing, since Linux namespace based containerisation is weak compared to Solaris Zones or FreeBSD Jails ;-)
I'm curious if solving the simple case (permission check, and refuse to add source if it's inaccessible, thus eliminating the incorrect behaviour at (2 and 3)) will prevent the branch leading to the more complicated Flatpak case from being taken, thus preventing this bug (UI freeze) from being triggered.
@m3nu, in other news: now that 0.7.5 has finally migrated to Debian testing, we can make a targeted bug fix upload (I can cherry pick from master and ship patches on top of 0.7.5) :-) I'd like to cherry pick the future fix for this issue, plus 064ba7c, plus the future fix to another permissions issue reported in Debian; I hope to forward this report to you later today. The adoption rate stats for Vorta (in Debian) are unlike any I've ever seen. It looks like it will be popular :-)
I dont recall any permission checks that are done when adding a folder. 🙈
But we should clearly have some, if it causes issues. os.access or os.stat should do the job.
Also great news on the Debian package update! Your work on it already lead to many improvements in the project itself. So non-Debian users profit too.
Hi Manu!
Manu @.***> writes:
I dont recall any permission checks that are done when adding a folder. 🙈
Yikes! Oops :-p
But we should clearly have some, if it causes issues. os.access or os.stat should do the job.
Yes, thank you, I'm happy you agree. I've upgraded the priority of the corresponding Debian bug (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=985424) to "important", with rationale--imho the rationale is worth reading.
Could we see this check added soon, before HEAD diverges too much from 0.7.5?
Also great news on the Debian package update! Your work on it already lead to many improvements in the project itself. So non-Debian users profit too.
Thanks :-) Also, that's great to hear, truly the ideal, and one of the reasons working on Vorta for Debian has been some of the most inspiring of last six months!
Kind regards, Nicholas
I've addressed those two issues in #951.
I agree with the arguments in the Debian bug on the possibility of producing incomplete backups. The reason why we don't fail the whole backup when Borg reports access errors is that this is very common on macOS. The user will get a popup to grant permissions to the Documents or Downloads folder. And there are some folders that are always restricted, like calendar, contacts, etc. So it wouldn't be wise to fully fail in such a case. It's still good to add a notice. So I changed the return message for backups with inaccessible files to point this out.
(I'm keeping all the changes minimal for now to make them easy to pick.)
Manu @.***> writes:
I've addressed those two issues in #951.
I agree with the arguments in the Debian bug on the possibility of producing incomplete backups. The reason why we don't fail the whole backup when Borg reports access errors is that this is very common on macOS. The user will get a popup to grant permissions to the Documents or Downloads folder. And there are some folders that are always restricted, like calendar, contacts, etc. So it wouldn't be wise to fully fail in such a case. It's still good to add a notice. So I changed the return message for backups with inaccessible files to point this out.
Ohh, I see. I hadn't realised that these weren't accessible. Does this mean that only Time Machine can produce a complete backup of a user's data on a macOS system?
Yes, this is the sort of popup and behaviour I had in mind :-) See my review on your PR two issues with the proposed solution. I hadn't considered that this was normal and expected on a macOS system, so users might also appreciate an "ignore inaccessible paths" toggle under the Miscellaneous configuration tab. As ever, if I made any mistakes due to ignorance, please point them out so I can learn.
Manu @.***> writes:
(I'm keeping all the changes minimal for now to make them easy to pick.)
Thank you so much, this accommodation is truly appreciated. I also think it will increase the chances of finally seeing Vorta in the "Top Ten Linux Backup Solutions" lists in 2021 ;-)
Ohh, I see. I hadn't realised that these weren't accessible. Does this mean that only Time Machine can produce a complete backup of a user's data on a macOS system?
On macOS, the user will either get a few prompts and then Vorta can access most folders, like Documents. Some Apple-internal settings folders are still not accessible.
To get a full backup without access errors, Full Disk Access needs to be granted. Maybe we should check for this on startup, in case the user doesn't change the setting himself. Would be just os.access('~/Library/Cookies', os.R_OK)
(since cookies are usually restricted)
Addressed the accessibility issue on macOS in a separate PR #952. This will reduce the possibility of incomplete backups. Even if it's mostly Apple auxiliary files.
Fixed this via #951. Vorta will now refuse to add folders without read permissions and give a warning, if Borg has an unclean exit code.
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
/home/someonelese
). You can select that by pressing enter.What happens: The whole UI freezes, I cannot click anymore. Note that the path also is not added in the UI. What should happen: Show an error message.
Environment (please complete the following information):
Additional context
Nothing logged to the Stdout: