[SOLVED] Permission denied (os error 13) on VM backup

popallo

Active Member
Jul 2, 2019
33
5
28
France
apacher.eu
Hi everyone, I'm asking for your help today because I can't find any solution.

I have a "proxmox backup server" which works correctly, in version 3 and installed on a "proxmox 7.4" host in an LXC container.

Everything works perfectly for the backup of data from the LXC containers of the host, however I end up with an error for the backup of the VMs.

Here is typically the error I have in the task viewer or when I run vzdump in CLI.

Code:
INFO: Backup started at 2023-08-05 05:17:54
INFO: status = running
INFO: VM Name:  ubuntu
INFO: include disk 'ide0' 'local-pve:vm-100-disk-0' 8G
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: creating Proxmox Backup Server archive 'vm/100/2023-08-05T03:17:54Z'
INFO: enabling encryption
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 2023-08-05 05:17:55

As long as it works well for backing up containers, so I don't think it's a rights issue despite the error pointing to that lead.

Any of you have an idea? a track to follow?

Thanks in advance for any help!
 
Last edited:
Hi,
how is the storage inside your Proxmox Backup Server set up? Does the backup user have all the necessary permissions on the datastore? If you can't use a dedicated host for PBS, using a VM instead of a container is slightly preferable, because of better isolation.
 
Hi,
how is the storage inside your Proxmox Backup Server set up? Does the backup user have all the necessary permissions on the datastore? If you can't use a dedicated host for PBS, using a VM instead of a container is slightly preferable, because of better isolation.
Hi Fiona and thank you for your reply!

The backup server is therefore mounted in LXC and the "datastore" is a NAS server mounted in NFS.

Here is the content of the /etc/fstab file

Bash:
nas:Backups /mnt/nas nfs defaults 0 0

I made the deliberate choice to go through LXC to limit the consumption of resources but if I really can't find a lead I will actually switch to a VM.

On the NAS side, the NFS share seems correct to me insofar as I can back up the LXC containers well.

Other information, when I run this type of command:

Bash:
proxmox-backup-client backup ${PBS_HOSTNAME}.pxar:/ --skip-lost-and-found
proxmox-backup-client list

The first command sends me the same error (Permission denied (os error 13)) while the second sends me the list of backups present on the datastore, so I think that right level it must be good on the PBS side. I put the user profile as "DatastoreAdmin", I even tried to switch to Admin and make a backup as Root but that leads to the same conclusion.
 
Last edited:
The datastore needs to be accessible by the backup user in PBS. E.g. can you cd to your datastore and then do sudo -u backup touch testing.file?
 
  • Like
Reactions: popallo
The datastore needs to be accessible by the backup user in PBS. E.g. can you cd to your datastore and then do sudo -u backup touch testing.file?
Hi fiona, and... and yes you are absolutely right, the main directory belonged to root! by switching the permissions to "backup" it works :)

Thank you for your invaluable help and I hope this topic will be useful to others.
 
  • Like
Reactions: Tomas Waldow

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!