Error when restore website

OS type and version Ubuntu 20.04
Webmin version latest
Virtualmin version Latest
Webserver version Apache 2.4
Related packages SUGGESTED

I had to restore a virtual server using virtualmin and it failed with this error. we use SSH and the login is done with a keypair. Can that be the problem

load failed!
ERROR 1 (HY000) at line 25 in file: ‘/tmp/.webmin/106206_1291112_10_restore.cgi’: Can’t create/write to file ‘/var/lib/mysql/db_jv74/ps_access.MYI’ (Errcode: 13 “Permission denied”)

I tested to allow password login and then it worked. Are there any way around this, I dont want to allow the password login for security reasons

In Virtualmin Backup, under Backup Destination, if you choose SSH there is a label captioned “Login with password or SSH key file”.You could apply the key to the text box next to it.

But the problem is that if I use key, the restore fail. If I use password it works and I want to deny password login for security

Ah. It was not clear in your initial message that the restore fails when you use the key (successfully) to backup.

Tell us more about how you restore. Is the restore carried on on the same system or a different one?

I use ssh to backup to another server remote. Nothing has changed, its ubuntu 20.04 on the webserver and 22.04 on the backup server. It has been the same for at least 6 month but I disabled password 2 month ago and this is the first time I have tried to restore a backup after that. The backups has always been done using the keypair. Without problems

And you get a permission denied error on a Ubuntu 20.04 system when you restore with SSH using a key pair. Unfortunately I dont have a 20.04 system to test this on.

I have to change the password from no to yes if I need to restore, Not a big deal but annoying