'backup' failed - backup connect failed: command error: Permission denied (os error 13)

Oct 18, 2022
40
3
8
When I run a backup on my VE server to my PBS I get permission denied. I have scoured Google, but to no avail. I have a PBS user created specifically for backups, but cannot figure out how to assign credentials to the scheduled backup. If that is even what I need to do.

INFO: starting new backup job: vzdump --mailto "email address" --notes-template '{{guestname}}' --mailnotification always --mode snapshot --node pve --storage Test --all 1 INFO: Starting Backup of VM 100 (qemu) INFO: Backup started at 2022-10-17 23:59:42 INFO: status = running INFO: VM Name: Test INFO: include disk 'scsi0' 'VM_OS:vm-100-disk-0' 100G INFO: include disk 'scsi1' 'VM_Storage:vm-100-disk-0' 1500G INFO: backup mode: snapshot INFO: ionice priority: 7 INFO: skip unused drive 'VM_Storage:vm-100-disk-1' (not included into backup) INFO: skip unused drive 'VM_Storage_New:vm-100-disk-0' (not included into backup) INFO: skip unused drive 'VM_Storage_Old:vm-100-disk-0' (not included into backup) INFO: skip unused drive 'Temp:vm-100-disk-0' (not included into backup) INFO: creating Proxmox Backup Server archive 'vm/100/2022-10-18T03:59:42Z' ERROR: VM 100 qmp command 'backup' failed - backup connect failed: command error: Permission denied (os error 13) INFO: aborting backup job INFO: resuming VM again ERROR: Backup of VM 100 failed - VM 100 qmp command 'backup' failed - backup connect failed: command error: Permission denied (os error 13) INFO: Failed at 2022-10-17 23:59:42 INFO: Starting Backup of VM 101 (qemu) INFO: Backup started at 2022-10-17 23:59:42 INFO: status = running INFO: VM Name: HomeAssistant9.2 INFO: include disk 'scsi0' 'VM_OS:vm-101-disk-0' 100G INFO: include disk 'efidisk0' 'VM_OS:vm-101-disk-1' 4M INFO: backup mode: snapshot INFO: ionice priority: 7 INFO: skip unused drive 'Temp:vm-101-disk-1' (not included into backup) INFO: skip unused drive 'Temp:vm-101-disk-0' (not included into backup) INFO: creating Proxmox Backup Server archive 'vm/101/2022-10-18T03:59:42Z' INFO: issuing guest-agent 'fs-freeze' command INFO: issuing guest-agent 'fs-thaw' command ERROR: VM 101 qmp command 'backup' failed - backup connect failed: command error: Permission denied (os error 13) INFO: aborting backup job INFO: resuming VM again ERROR: Backup of VM 101 failed - VM 101 qmp command 'backup' failed - backup connect failed: command error: Permission denied (os error 13) INFO: Failed at 2022-10-17 23:59:43 INFO: Backup job finished with errors TASK ERROR: job errors
 
  • Like
Reactions: meichthys
You can use credentials when adding the PBS storage at Datacenter -> Storage -> Add -> PBS.

But not sure if that is really the problem here.
 
By default new users have no permissions. You can add user permissions in the web interface under Configuration -> Access Control -> Permissions.
There you can click on Add -> User permissions and in the popup add /datastore to the path, select the user and Role: DatastoreBackup.
Alternatively to a user to create backups, you can also create an API token and give it the necessary permissions.

For more info see User Management
 
I have created the user for backups, but do not know where to add that in the Datacenter backup job configuration.
I already answered that:
You can use credentials when adding the PBS storage at Datacenter -> Storage -> Add -> PBS.

Credentials can only be set for the entire PBS storage in PVE, not for single backup jobs. You have to delete your PBS storage in PVE and add it again using other credentials.
 
I recreated everything from scratch, but still get the same error.

1666558222533.png
1666558255747.png
1666558316448.png
1666558350898.png
1666558374938.png
INFO: starting new backup job: vzdump --storage Backups --node pve --notes-template '{{guestname}}' --mailto ClintonITWorks@gmail.com --mailnotification always --mode snapshot --all 1 INFO: Starting Backup of VM 100 (qemu) INFO: Backup started at 2022-10-23 16:46:56 INFO: status = running INFO: VM Name: PBS-Backup INFO: include disk 'scsi0' 'VM_OS:vm-100-disk-0' 100G INFO: include disk 'scsi1' 'VM_Storage:vm-100-disk-0' 3999999679528 INFO: backup mode: snapshot INFO: ionice priority: 7 INFO: creating Proxmox Backup Server archive 'vm/100/2022-10-23T20:46:56Z' ERROR: VM 100 qmp command 'backup' failed - backup connect failed: command error: Permission denied (os error 13) INFO: aborting backup job INFO: resuming VM again ERROR: Backup of VM 100 failed - VM 100 qmp command 'backup' failed - backup connect failed: command error: Permission denied (os error 13) INFO: Failed at 2022-10-23 16:46:56 INFO: Starting Backup of VM 101 (qemu) INFO: Backup started at 2022-10-23 16:46:56 INFO: status = running INFO: VM Name: HomeAssistant9.2 INFO: include disk 'scsi0' 'VM_OS:vm-101-disk-0' 100G INFO: include disk 'efidisk0' 'VM_OS:vm-101-disk-1' 4M INFO: backup mode: snapshot INFO: ionice priority: 7 INFO: creating Proxmox Backup Server archive 'vm/101/2022-10-23T20:46:56Z' INFO: issuing guest-agent 'fs-freeze' command INFO: issuing guest-agent 'fs-thaw' command ERROR: VM 101 qmp command 'backup' failed - backup connect failed: command error: Permission denied (os error 13) INFO: aborting backup job INFO: resuming VM again ERROR: Backup of VM 101 failed - VM 101 qmp command 'backup' failed - backup connect failed: command error: Permission denied (os error 13) INFO: Failed at 2022-10-23 16:46:57 INFO: Starting Backup of VM 102 (qemu) INFO: Backup started at 2022-10-23 16:46:57 INFO: status = stopped INFO: backup mode: stop INFO: ionice priority: 7 INFO: VM Name: Win10-22H2 INFO: include disk 'ide0' 'VM_OS:vm-102-disk-0' 64G INFO: creating Proxmox Backup Server archive 'vm/102/2022-10-23T20:46:57Z' INFO: starting kvm to execute backup task ERROR: VM 102 qmp command 'backup' failed - backup connect failed: command error: Permission denied (os error 13) INFO: aborting backup job INFO: stopping kvm after backup task ERROR: Backup of VM 102 failed - VM 102 qmp command 'backup' failed - backup connect failed: command error: Permission denied (os error 13) INFO: Failed at 2022-10-23 16:47:00 INFO: Starting Backup of VM 103 (lxc) INFO: Backup started at 2022-10-23 16:47:00 INFO: status = stopped INFO: backup mode: stop INFO: ionice priority: 7 INFO: CT Name: Ubutnu-20.04-1 INFO: including mount point rootfs ('/') in backup INFO: creating Proxmox Backup Server archive 'ct/103/2022-10-23T20:47:00Z' INFO: run: lxc-usernsexec -m u:0:100000:65536 -m g:0:100000:65536 -- /usr/bin/proxmox-backup-client backup --crypt-mode=none pct.conf:/var/tmp/vzdumptmp126260_103/etc/vzdump/pct.conf root.pxar:/mnt/vzsnap0 --include-dev /mnt/vzsnap0/./ --skip-lost-and-found --exclude=/tmp/?* --exclude=/var/tmp/?* --exclude=/var/run/?*.pid --backup-type ct --backup-id 103 --backup-time 1666558020 --repository Backup@pbs@192.168.1.101:Test_Backups INFO: Starting backup: ct/103/2022-10-23T20:47:00Z INFO: Client name: pve INFO: Starting backup protocol: Sun Oct 23 16:47:00 2022 INFO: Error: Permission denied (os error 13) ERROR: Backup of VM 103 failed - command 'lxc-usernsexec -m u:0:100000:65536 -m g:0:100000:65536 -- /usr/bin/proxmox-backup-client backup '--crypt-mode=none' pct.conf:/var/tmp/vzdumptmp126260_103/etc/vzdump/pct.conf root.pxar:/mnt/vzsnap0 --include-dev /mnt/vzsnap0/./ --skip-lost-and-found '--exclude=/tmp/?*' '--exclude=/var/tmp/?*' '--exclude=/var/run/?*.pid' --backup-type ct --backup-id 103 --backup-time 1666558020 --repository Backup@pbs@192.168.1.101:Test_Backups' failed: exit code 255 INFO: Failed at 2022-10-23 16:47:00 INFO: Starting Backup of VM 104 (qemu) INFO: Backup started at 2022-10-23 16:47:00 INFO: status = running INFO: VM Name: pfSense-2.6.0 INFO: include disk 'scsi0' 'VM_OS:vm-104-disk-0' 16G INFO: backup mode: snapshot INFO: ionice priority: 7 INFO: creating Proxmox Backup Server archive 'vm/104/2022-10-23T20:47:00Z' ERROR: VM 104 qmp command 'backup' failed - backup connect failed: command error: Permission denied (os error 13) INFO: aborting backup job INFO: resuming VM again ERROR: Backup of VM 104 failed - VM 104 qmp command 'backup' failed - backup connect failed: command error: Permission denied (os error 13) INFO: Failed at 2022-10-23 16:47:01 INFO: Starting Backup of VM 105 (qemu) INFO: Backup started at 2022-10-23 16:47:01 INFO: status = running INFO: VM Name: Windows-Server-2022 INFO: include disk 'scsi0' 'VM_OS:vm-105-disk-0' 64G INFO: backup mode: snapshot INFO: ionice priority: 7 INFO: creating Proxmox Backup Server archive 'vm/105/2022-10-23T20:47:01Z' ERROR: VM 105 qmp command 'backup' failed - backup connect failed: command error: Permission denied (os error 13) INFO: aborting backup job INFO: resuming VM again ERROR: Backup of VM 105 failed - VM 105 qmp command 'backup' failed - backup connect failed: command error: Permission denied (os error 13) INFO: Failed at 2022-10-23 16:47:01 INFO: Starting Backup of VM 106 (qemu) INFO: Backup started at 2022-10-23 16:47:01 INFO: status = stopped INFO: backup mode: stop INFO: ionice priority: 7 INFO: VM Name: Windows-Server-2022-2 INFO: include disk 'scsi0' 'VM_OS:vm-106-disk-0' 64G INFO: creating Proxmox Backup Server archive 'vm/106/2022-10-23T20:47:01Z' INFO: starting kvm to execute backup task ERROR: VM 106 qmp command 'backup' failed - backup connect failed: command error: Permission denied (os error 13) INFO: aborting backup job INFO: stopping kvm after backup task ERROR: Backup of VM 106 failed - VM 106 qmp command 'backup' failed - backup connect failed: command error: Permission denied (os error 13) INFO: Failed at 2022-10-23 16:47:04 INFO: Backup job finished with errors TASK ERROR: job errors

Oct 23 16:44:50 pbs proxmox-backup-proxy[638]: GET //api2/json/backup?backup-id=100&backup-time=1666557890&backup-type=vm&benchmark=false&debug=false&store=Test_Backups: 400 Bad Request: [client [::ffff:192.168.1.100]:35502] Permission denied (os error 13) Oct 23 16:44:51 pbs proxmox-backup-proxy[638]: GET //api2/json/backup?backup-id=101&backup-time=1666557890&backup-type=vm&benchmark=false&debug=false&store=Test_Backups: 400 Bad Request: [client [::ffff:192.168.1.100]:35506] Permission denied (os error 13) Oct 23 16:44:53 pbs proxmox-backup-proxy[638]: GET //api2/json/backup?backup-id=102&backup-time=1666557891&backup-type=vm&benchmark=false&debug=false&store=Test_Backups: 400 Bad Request: [client [::ffff:192.168.1.100]:35516] Permission denied (os error 13) Oct 23 16:44:54 pbs proxmox-backup-proxy[638]: GET //api2/json/backup?backup-id=103&backup-time=1666557894&backup-type=ct&benchmark=false&debug=true&store=Test_Backups: 400 Bad Request: [client [::ffff:192.168.1.100]:32852] Permission denied (os error 13) Oct 23 16:44:55 pbs proxmox-backup-proxy[638]: GET //api2/json/backup?backup-id=104&backup-time=1666557894&backup-type=vm&benchmark=false&debug=false&store=Test_Backups: 400 Bad Request: [client [::ffff:192.168.1.100]:32858] Permission denied (os error 13) Oct 23 16:44:55 pbs proxmox-backup-proxy[638]: GET //api2/json/backup?backup-id=105&backup-time=1666557895&backup-type=vm&benchmark=false&debug=false&store=Test_Backups: 400 Bad Request: [client [::ffff:192.168.1.100]:32872] Permission denied (os error 13) Oct 23 16:44:57 pbs proxmox-backup-proxy[638]: GET //api2/json/backup?backup-id=106&backup-time=1666557895&backup-type=vm&benchmark=false&debug=false&store=Test_Backups: 400 Bad Request: [client [::ffff:192.168.1.100]:32886] Permission denied (os error 13) Oct 23 16:46:56 pbs proxmox-backup-proxy[638]: GET //api2/json/backup?backup-id=100&backup-time=1666558016&backup-type=vm&benchmark=false&debug=false&store=Test_Backups: 400 Bad Request: [client [::ffff:192.168.1.100]:46892] Permission denied (os error 13) Oct 23 16:46:57 pbs proxmox-backup-proxy[638]: GET //api2/json/backup?backup-id=101&backup-time=1666558016&backup-type=vm&benchmark=false&debug=false&store=Test_Backups: 400 Bad Request: [client [::ffff:192.168.1.100]:46904] Permission denied (os error 13) Oct 23 16:46:59 pbs proxmox-backup-proxy[638]: GET //api2/json/backup?backup-id=102&backup-time=1666558017&backup-type=vm&benchmark=false&debug=false&store=Test_Backups: 400 Bad Request: [client [::ffff:192.168.1.100]:46912] Permission denied (os error 13) Oct 23 16:47:00 pbs proxmox-backup-proxy[638]: GET //api2/json/backup?backup-id=103&backup-time=1666558020&backup-type=ct&benchmark=false&debug=true&store=Test_Backups: 400 Bad Request: [client [::ffff:192.168.1.100]:46938] Permission denied (os error 13) Oct 23 16:47:01 pbs proxmox-backup-proxy[638]: GET //api2/json/backup?backup-id=104&backup-time=1666558020&backup-type=vm&benchmark=false&debug=false&store=Test_Backups: 400 Bad Request: [client [::ffff:192.168.1.100]:46952] Permission denied (os error 13) Oct 23 16:47:01 pbs proxmox-backup-proxy[638]: GET //api2/json/backup?backup-id=105&backup-time=1666558021&backup-type=vm&benchmark=false&debug=false&store=Test_Backups: 400 Bad Request: [client [::ffff:192.168.1.100]:46964] Permission denied (os error 13) Oct 23 16:47:03 pbs proxmox-backup-proxy[638]: GET //api2/json/backup?backup-id=106&backup-time=1666558021&backup-type=vm&benchmark=false&debug=false&store=Test_Backups: 400 Bad Request: [client [::ffff:192.168.1.100]:46968] Permission denied (os error 13) Oct 23 16:47:27 pbs proxmox-backup-proxy[638]: write rrd data back to disk Oct 23 16:47:27 pbs proxmox-backup-proxy[638]: starting rrd data sync Oct 23 16:47:28 pbs proxmox-backup-proxy[638]: rrd journal successfully committed (23 files in 0.023 seconds)
 

Attachments

  • 1666558462935.png
    1666558462935.png
    127.1 KB · Views: 3
  • 1666558475120.png
    1666558475120.png
    127.1 KB · Views: 4
  • Like
Reactions: meichthys
I have decided to use UrBackup instead of Proxmox Backup Server, as I could never get it to work. I am now backing up to a separate TrueNAS Scale install on it's own bare metal install. I do still need to figure out how to do Proxmox snapshots with UrBackup, though I may just go with Proxmox backing itself and VMs to the TrueNAS system directly via an NFS share. Which incidentally is what UrBackup is connected to as well, though I would create a separate share for Proxmox of course.
 
I'm also seeing this same issue. In the past i was able to at least get the backups to work by using the root pbs user, but now i get the same `Permission denied (os error 13)` error when trying to run any backups. I've also tried creating a separate user on the pbs machine and giving it `/datastore/backups` permissions, but still the same error. I have pve and pbs updated fully as of 11/23/2022.

This is the pbs datastore showing the permissions for the `backups` user
1669211212517.png

This is the configuration on pve for the backup storage (The storage is added fine when clicking Add and i can view the storage in pve).
1669211169056.png


This is the backup job configuration:
1669211311183.png

This is the backup job log:
1669211387510.png
 

Attachments

  • 1669211135610.png
    1669211135610.png
    7.7 KB · Views: 3
Last edited:
@noel.

To shed some more light on this, my datastore is mapped to /backups.
I'm not sure if it's supported, but I mount an external drive to /backups using zpool import backups (The 'backups' zpool was created using the pbs web UI and was given a mountpoint like: zfs set mountpoint=/backups backups)
After the mount of the zfs pool to /backups, the backups will fail. However, if i unmount the zpool (zpool export backups), then the backups run fine, but dump the backup data onto the pbs filesystem which doesn't have enough storage.

Is it possible to do what i'm trying to do? (Mount a zpool to the datastore directory and backup to it? I've done it in the past without issues, but now something seems to be preventing it).
 
Last edited:
  • Like
Reactions: ClintonITWorks
To follow up on this one more time, i discovered that the backup wasn't working because `.chunks` was missing from the dataset. It appears that the '.chunks' was removed when mounting the zfs pool onto the /backups directory. To fix this, I allowed proxmox to create a dataset when creating the zpool. Afterward i used `zfs set mountpoint` to set the mountpoint to `/backups`, then I ran `zpool export <pool_name>`, then ran `zpool import <pool_name>` to get the pool mounted back to /backups. This time the backups work since there is `.chunks` in the datastore.

TLDR: the zpool i was mounting to the datastore directory wasn't initialized as a datastore.
 
HI,


same issue. I have create a user more to root@pam, but from Promxox nodes I connect to datastore but have the same permission issues.
Any news on that?


Regards
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!