cannot backup to nas: EPERM: Operation not permitted

bforpc

Renowned Member
Nov 26, 2013
151
5
83
Hamburg
Hi,

i have a new installed PBS with attached a NAS storage, mounted to a local mountpoint (speed of backup is not relevant in this case).
The NAS is mounted with full rw rights as smb share.
After start a Backup from a client on the cluster, i get these error:

Code:
ERROR: VM 117 qmp command 'backup' failed - backup register image failed: command error: inserting chunk on store 'nas' failed for bb9f8df61474d25e71fa00722318cd387396ca1736605e1248821cc0de3d3af8 - fchmod "/mnt/nas-share/proxmox-backup/.chunks/bb9f/bb9f8df61474d25e71fa00722318cd387396ca1736605e1248821cc0de3d3af8.tmp_HCXoez" failed: EPERM: Operation not permitted

On PBS i can see in the storage content, that the VM's are created but with no data.
I can touch (on PBS CLI) the above file. It will be created.

Bfo
 
Last edited:
the system user backup (on the PBS host) needs to be able to write to the datastore, apparently it can't..
 
Hello fabian,

thank you for your answer. The permissions of the mounted, local storage are 777 (from the top to the last file).
Uses pbs ACL's? Which User does run the backup?
I cant see any other user on the system, whos from pbs. The pbs was installed on top of debain bullseye today.

Bfo
 
Last edited:
Hi,

I think, this cant be the problem.
Like i told above, on the storage are directorys created for each VM *after* i start the backup on the Proxmox Host (not pbs) in my case in
/mnt/nas-share/proxmox-backup/vm (these Directorys have 777 rights).
Also in each of them are subdirectorys with [DateTimeName] and one file "owner" (with content root@pam). So someone has create this dirs and files and have full write access. Also the user "backup" has full write access, tested with
"sudo -u backup touch test.txt" inside /mnt/nas-share/proxmox-backup/vm.

My datastore.cfg look like that:

Code:
datastore: nas
    comment
    gc-schedule daily
    path /mnt/nas-share/proxmox-backup
    prune-schedule daily

root@hh-pbs $ sudo -u backup touch /mnt/nas-share/proxmox-backup/.chunks/bb9f/bb9f8df61474d25e71fa00722318cd387396ca1736605e1248821cc0de3d3af8.tmp_HCXoez l /mnt/nas-share/proxmox-backup/.chunks/bb9f/bb9f8df61474d25e71fa00722318cd387396ca1736605e1248821cc0de3d3af8.tmp_HCXoez -rwxrwxrwx 1 root users 0 18. Jan 13:20 /mnt/nas-share/proxmox-backup/.chunks/bb9f/bb9f8df61474d25e71fa00722318cd387396ca1736605e1248821cc0de3d3af8.tmp_HCXoez sudo -u backup rm /mnt/nas-share/proxmox-backup/.chunks/bb9f/bb9f8df61474d25e71fa00722318cd387396ca1736605e1248821cc0de3d3af8.tmp_HCXoez
No errors with the commands above.

for Info: the owner of the files an the storage is "root.users"

Bfo
 
Last edited:
it is the problem for sure - the error states that modifying the permissions failed for lack of permissions..
 
  • Like
Reactions: bforpc
Maybe it's not permitted because the path gets over 255 chars or something similar on the storage side? Or bad ACLs on the NAS?
 
  • Like
Reactions: bforpc
Hello fabian.,

thanks again. After your answer i changed the mount from smb to nfs ... and it worked. So the problem is gone. To help any other with the same problem, it will be nice to show more details of this access rights to the user.

Also thanks for Dunuin's answer for further investigation.
Best thanks @ all :)

Bfo
 
Last edited:
the error message already gives you all the details - the operation, the path, and the error. PBS doesn't get any more information either ;)
 
I'm using a Netgear NAS and had the same problem, I solved it by disabling the UID/GID combination, in this case, choose the option "not combining root"
1681397539052.png
 
  • Like
Reactions: SirLagz
THANK YOU !!!!
This gave me the critical hint on how to set up a NFS share on OpenMediaVault as a backup target for PBS
needs the no_root_squash option!
Thank you both! Was struggling to get my OVM share as backup target and this got it working.
 
Ich habe mir eine ProxMox Testumgebung aufgebaut und eine VM mit dem Proxmox Backup Server und eine VM mit der aktuellen OpenMediaVault V7 NAs Software (Debian) erzeugt.
Der Datenstore ist eine SMB Freigabe in der OMV7 NAS Software mit einem Backupuser.

OMV / NAS / SMB:
Share: nasstore, Settings: Browseable, Inherit ACL, Inherit permissions
User bakuser, Permission Read/write

Proxmox BackupServer:
Der Store wird in der FSTAB auf dem Proxmox Backup Server mit nachfolgende Werte eingehängt :

Datei: etc/fstab
//server/nasstore /mnt/store cifs username=bakuser,password=backup,vers=3.0,filemode=0777,dirmode=0777,uid=34,gid=34,nobrl 0 0


Damit konnte ich eine Sicherung auf das NAS via smb erfolgreich durchführen.
 
Last edited:

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!