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

popallo

Well-Known Member
Jul 2, 2019
36
6
48
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
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.
Hello.

Please, how did you change permissions ?

I don't know how to change permissions of NFS share for user backup, do you have any hint ?
 
Hello.

Please, how did you change permissions ?

I don't know how to change permissions of NFS share for user backup, do you have any hint ?
Of finally found problem. I had bad NSF setting on storage side.
 
is this user created as a user of operating system or proxmox user? im having the same problem and my users is proxmox, meaning i can't change to that user in terminal
 
Hi,
is this user created as a user of operating system or proxmox user? im having the same problem and my users is proxmox, meaning i can't change to that user in terminal
the backup user is a system user that already exists by default on PBS itself. It has UID and GID 34 as you can see in /etc/passwd. You need to ensure that your datastore directory tree is accessible by that user. If the datastore is an NFS mount, you might need to use the proper mount options and/or configure the NFS server side correctly too.
 
  • Like
Reactions: juancarlosmx
yeah, that was it, i chown permissions to the user and errors no longer appeared. thank you!

i rclone a backup server into a new installation of pbs and this caused the dataastore files to be owned by root, causing the error when backup users tried to do something

Hi,

the backup user is a system user that already exists by default on PBS itself. It has UID and GID 34 as you can see in /etc/passwd. You need to ensure that your datastore directory tree is accessible by that user. If the datastore is an NFS mount, you might need to use the proper mount options and/or configure the NFS server side correctly too.
 
Last edited: