BackUp on PBS fails with "INFO: Error: Permission denied (os error 13)"

matthias-mw

New Member
Nov 18, 2023
5
0
1
Hi,

I try to get my backups working on the PBS V3.2.1. In side the PBS I have a datapool connect to an SMB share.


To start i first connected the SMB share directly to the PVE Storage "SMB", and I was able to to a BackUp to the SMB-Share. see:
Code:
INFO: starting new backup job: vzdump 202 --notes-template '{{guestname}}' --remove 0 --mode snapshot --compress zstd --storage SMB --node proxmox
INFO: filesystem type on dumpdir is 'cifs' -using /var/tmp/vzdumptmp1753408_202 for temporary files
INFO: Starting Backup of VM 202 (lxc)
INFO: Backup started at 2024-02-03 00:15:09
INFO: status = running
INFO: CT Name: jellyfin
INFO: including mount point rootfs ('/') in backup
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: create storage snapshot 'vzdump'
  Logical volume "snap_vm-202-disk-1_vzdump" created.
INFO: creating vzdump archive '/mnt/pve/SMB/dump/vzdump-lxc-202-2024_02_03-00_15_09.tar.zst'
INFO: Total bytes written: 2479872000 (2.4GiB, 163MiB/s)
INFO: archive file size: 883MB
INFO: adding notes to backup
INFO: cleanup temporary 'vzdump' snapshot
  Logical volume "snap_vm-202-disk-1_vzdump" successfully removed.
INFO: Finished Backup of VM 202 (00:00:16)
INFO: Backup finished at 2024-02-03 00:15:25
INFO: Backup job finished successfully
INFO: notified via target `mail-to-root`
TASK OK

Than I connect the same Share to the PBS as Datastore "test" and than connected the PBS to the PVE. When I run the backUp now I get the following Error:

Code:
INFO: starting new backup job: vzdump 202 --notes-template '{{guestname}}' --remove 0 --node proxmox --storage testSMB --mode snapshot
INFO: Starting Backup of VM 202 (lxc)
INFO: Backup started at 2024-02-03 00:20:31
INFO: status = running
INFO: CT Name: jellyfin
INFO: including mount point rootfs ('/') in backup
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: create storage snapshot 'vzdump'
  Logical volume "snap_vm-202-disk-1_vzdump" created.
INFO: creating Proxmox Backup Server archive 'ct/202/2024-02-02T23:20:31Z'
INFO: run: /usr/bin/proxmox-backup-client backup --crypt-mode=none pct.conf:/var/tmp/vzdumptmp1757351_202/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 202 --backup-time 1706916031 --repository root@pam@192.168.1.181:test
INFO: Starting backup: ct/202/2024-02-02T23:20:31Z
INFO: Client name: proxmox
INFO: Starting backup protocol: Sat Feb  3 00:20:32 2024
INFO: Error: Permission denied (os error 13)
INFO: cleanup temporary 'vzdump' snapshot
  Logical volume "snap_vm-202-disk-1_vzdump" successfully removed.
ERROR: Backup of VM 202 failed - command '/usr/bin/proxmox-backup-client backup '--crypt-mode=none' pct.conf:/var/tmp/vzdumptmp1757351_202/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 202 --backup-time 1706916031 --repository root@pam@192.168.1.181:test' failed: exit code 255
INFO: Failed at 2024-02-03 00:20:32
INFO: Backup job finished with errors
INFO: notified via target `mail-to-root`
TASK ERROR: job errors

To what is the permission error linked?

I locked to the pbs via shell and test i f I can write to the share. This works, so I guess the SMB Share is just right.

To the PBS and the PVE I am logged in as root@pam.

Any Hints where to search?


Thanks
 
Does the "backup" user got write access to the mounted SMB share?

For VZDump UID 0 + 100000 need read+write access. For PBS its UID 34.
 
Last edited:
Hi @Dunuin ,

thanks for the hint this was an error since all the directories belonged to root and not to backup (uid34). With settings changed smb works right now. But actually I would like to use NFS. So I created a NFS share on the truenas server and gave it the owner backup:backup and mounted this share at mnt/backUp at my PBS.
Now the backup starts and creates all the directories, but is still not aber to insert the data on this nfs share:
Code:
INFO: starting new backup job: vzdump 202 --remove 0 --notes-template '{{guestname}}' --mode snapshot --storage backUpServer --node proxmox
INFO: Starting Backup of VM 202 (lxc)
INFO: Backup started at 2024-02-03 09:55:25
INFO: status = running
INFO: CT Name: jellyfin
INFO: including mount point rootfs ('/') in backup
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: create storage snapshot 'vzdump'
  Logical volume "snap_vm-202-disk-1_vzdump" created.
INFO: creating Proxmox Backup Server archive 'ct/202/2024-02-03T08:55:25Z'
INFO: run: /usr/bin/proxmox-backup-client backup --crypt-mode=none pct.conf:/var/tmp/vzdumptmp2161835_202/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 202 --backup-time 1706950525 --repository root@pam@192.168.1.181:backUpOnTrueNas
INFO: Starting backup: ct/202/2024-02-03T08:55:25Z
INFO: Client name: proxmox
INFO: Starting backup protocol: Sat Feb  3 09:55:26 2024
INFO: No previous manifest available.
INFO: Upload config file '/var/tmp/vzdumptmp2161835_202/etc/vzdump/pct.conf' to 'root@pam@192.168.1.181:8007:backUpOnTrueNas' as pct.conf.blob
INFO: Upload directory '/mnt/vzsnap0' to 'root@pam@192.168.1.181:8007:backUpOnTrueNas' as root.pxar.didx
INFO: catalog upload error - channel closed
INFO: Error: inserting chunk on store 'backUpOnTrueNas' failed for cb3786ebd9e177bd5da977d2593ded56e6d112ffb0040ac330b6d2e70486af37 - mkstemp "/mnt/backUp/.chunks/cb37/cb3786ebd9e177bd5da977d2593ded56e6d112ffb0040ac330b6d2e70486af37.tmp_XXXXXX" failed: ENOENT: No such file or directory
INFO: cleanup temporary 'vzdump' snapshot
  Logical volume "snap_vm-202-disk-1_vzdump" successfully removed.
ERROR: Backup of VM 202 failed - command '/usr/bin/proxmox-backup-client backup '--crypt-mode=none' pct.conf:/var/tmp/vzdumptmp2161835_202/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 202 --backup-time 1706950525 --repository root@pam@192.168.1.181:backUpOnTrueNas' failed: exit code 255
INFO: Failed at 2024-02-03 09:55:28
INFO: Backup job finished with errors
INFO: notified via target `mail-to-root`
TASK ERROR: job errors

When I log in to the PBS Shell I get this:
Code:
root@pbs:/mnt# ls -lisa /mnt
total 21
393217 4 drwxr-xr-x  4 root   root   4096 Feb  2 23:37 .
     2 4 drwxr-xr-x 18 root   root   4096 Feb  2 21:00 ..
    34 9 drwxrwxr-x  5 backup backup    5 Feb  3 09:37 backUp
443303 4 drwxr-xr-x  4 backup backup 4096 Feb  3 09:16 smb
root@pbs:/mnt# ls -lisa /mnt/backUp
total 62
    34  9 drwxrwxr-x 5 backup backup    5 Feb  3 09:37 .
393217  4 drwxr-xr-x 4 root   root   4096 Feb  2 23:37 ..
   258  9 drwxrwx--- 3 backup backup    3 Feb  3 09:47 ct
     3 33 drwxrwx--- 2 backup backup    2 Feb  3 08:59 dump
   257  9 drwxrwx--- 2 backup backup    2 Feb  3 08:57 images
root@pbs:/mnt# ls -lisa /mnt/backUp/ct
total 26
258 9 drwxrwx--- 3 backup backup 3 Feb  3 09:47 .
 34 9 drwxrwxr-x 5 backup backup 5 Feb  3 09:37 ..
140 9 drwxrwx--- 3 backup backup 4 Feb  3 09:47 202
root@pbs:/mnt# ls -lisa /mnt/backUp/ct/202
total 26
140 9 drwxrwx--- 3 backup backup 4 Feb  3 09:47 .
258 9 drwxrwx--- 3 backup backup 3 Feb  3 09:47 ..
  6 9 drwxrwx--- 2 backup backup 2 Feb  3 09:47 2024-02-03T08:47:05Z
  5 1 -rw-rw---- 1 backup backup 9 Feb  3 09:47 owner
root@pbs:/mnt# id backup
uid=34(backup) gid=34(backup) groups=34(backup),26(tape)

So it muss be related to my NFS setting but no clue why I can make new directories but cant insert data?
 
Hi everybody,

solved my issues! ;)

I had to destroy the nfs datastore on the pbs and recreate it once more after i have fixed all the permission issues on the NFS share as described above. It turned out that the .chunk folders (which are created at the creation of the datastore) where missing because of the permission problem with the nfs share at the first attempt.

ONE HINT for the developers: There was no warning during the creation of the data-store with insufficient user rights...

Thanks for the Help
 

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!