-
-
Notifications
You must be signed in to change notification settings - Fork 123
Fix restores from backup logs #1108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
It looks like you are inverting the meaning of the |
It does, because currently any newly created scheduled backup cannot later be restored using backup logs page even being root user. And the function that checks on features expects either safe or not-safe user flag. So, if user is safe we don’t allow all those other features other than safe. Currently it’s the opposite. You can spin up a new instance, and give it a shot yourself. Please try. |
Hang on, I just created a new schedule backup in Virtualmin, let it run, and then was able to restored from the Backup Logs page just fine. |
On the backup log page for a problem backup, what does the "Run by web user" field? |
It clearly says it's run by There is clearly a bug. This PR fixes it so things work. Though, we'll need to discuss more in the chat about what we expect the domain owner to do in terms of features and if they should ever be allowed to make restores with all features enabled. I sent you the link via email to one of our servers running Virtualmin with a backup made by |
Actually I think the bug is here : https://github.com/virtualmin/virtualmin-gpl/blob/master/restore_form.cgi#L35 I'll check it out later today ... |
Ok, check out this fix : df5d130 There was indeed a bug! |
Alright, thanks! Yet, it doesn't address other parts of the code that I addressed in this PR. In particular calls to |
You can apply your patch to the Virtualmin server I mentioned earlier in the email and see if the issue still persists. |
I applied the patch - please try it out |
Alright, I have applied the patch to my development system and tested things out—it does seem to work for A few questions though:
|
|
Can a domain owner safely restore backups with all features ever? Is so, when? |
Yes, if the backup was created by root. |
What if the backup was created by a domain owner? |
I think yes, as long as it's the same owner, and if it's signed. |
|
The signing is a guarantee that a backup made by Virtualmin wasn't modified by someone else. |
If a user has an access to a private key they can modify a backup still, and potentially corrupt one of the global features? |
Yes, correct, which is why the Virtualmin private keys need to be kept secure. |
Hey Jamie,
As discussed in the PM.