Permssion denied (os error 13) on NFS share

Jun 23, 2020
16
6
23
53
Hi All,

i always get Permission denied on my NFS mounted datastore ...
When i add datastore to PBS everything seems to be ok ... pbs creates .chunks directory ...

pbs.PNG

... and access on .chunks directory seems to be ok too:
Code:
ls -ld /backup/.chunks
drwxrwxrwx 1 backup backup 1138688 Aug 24 07:38 /backup/.chunks

If i add a directory on the local filesystem to Datastores the Permission denied message does not appear.

Same result if i mount as cifs share ...

PBS Version: 0.8-6 BETA
I installed PBS form Proxmox-Backup-Server.iso image

Thank you for any assistance ...


Kind Regards,

Andreas
 
Hey Andreas,

is it possible that the NFS folder got unmounted? Do you get the error when opening the list of datastores, or when you open the datastore itself?
"Same result if i mount as cifs share ...", means it work with cifs, or not?

However, PBS is intended to be used with local storage.

Best Regards,
Hannes
 
Hi Hannes,

the network share is still mounted ...

I get the error message when opening the datastore itself ... not when opening the list of datastores.

"Same result if i mount as cifs share ..." means datastore does not work using cifs ... sorry for my unclear description.

What a shame, that PBS does not work with network shares ...
Do you know if PBS datastores will work on network shares in future releases ?
 
I tried to setup a NFS mounted datastore and it seemed to work fine.

/etc/exports
Code:
/example2 192.168.31.155/20(rw,no_root_squash,subtree_check)

and
Code:
mount -t nfs 192.168.31.155:/example2 /mnt/datastore/nfs2
to mount it on the PBS

Do you maybe use an older version of NFS?

Best Regards,
Hannes
 
  • Like
Reactions: slimmy
Hello Hannes,

my NFS server is on a Synology NAS with latest DSM Version installed...

According to your last post, i tried out PBS datastore on a fresh installed Debian Buster test-server NFS share, and that worked for me too ... !?

I am really confused about this behavior because standard PVE backup works on the same Synology NFS share. It seems that there is some kind of inkompatibility between Synology NFS share and PBS datastore.

After that i tried nfs mount option vers=2 and vers=3 but i still get permission denied when accessing datastore on the Synology NFS share.

Do you have an idea how i could get PBS working on Synlology NFS share ?

Thanks,
Andreas
 
I've found some post on reddit about a similar problem:
...To fix it, I open the NFS Rules under the Shared Folder options, then set the Squash option to "map all users to admin". Boom, it's back to normal. In my case, I don't think it'll be a problem unless someone here feels strongly against this solution.
Reddit post

Maybe it's worth a try.

Best Regards,
Hannes
 
  • Like
Reactions: vazir
Hello Hannes,

i have already checked this option before, but if i use "map all users to admin " on Synology NAS i get another error message already when using create datastore command:
Code:
proxmox-backup-manager datastore create teststore /backup

Error: EPERM: Operation not permitted
... and the chunkstore will not be created ...

Kind Regards,

Andreas
 
Hi Andreas,

I couldn't find a workaround to get it to work with Synology either. It really seems to be some compatibility issue with Synology and not NFS itself. If you should figure out a way to make it work, could post your solution here, so people having the the problem in the future have a reference.
 
Last edited:
Hello Hannes,

after playing around with many different parameters and spending a lot of time i gave up because i did not get working Datastores on mounted Synology NAS either.

There is only one configuration i got working, but i think this is a really dirty workaround ;-)

1. I installed PBS as a VM on my PVE Cluster
2. I added my Synology NFS share as a PVE image storage to my cluster
3. I created a virtual raw disk drive for my PBS VM, stored on the PVE NFS image storage
4. I mounted the virtual drive within my PBS VM as a local drive, and created a PBS Datastore on it.

That works :-/

Kind Regards,

Andreas
 
  • Like
Reactions: powersupport
Hi everyone,

i found the solution for NFS mounts from Synology NAS get the error "Error: EPERM: Operation not permitted" when trying the nfs mount to use as datastore in Proxmox Backup Server. It is a user right issue with the folder on the synology nas. I created the user backup and group backup on my synology, changed the uid and guid on synology nas side to the uid and guid from PBS user backup via ssh and reboot synology. Than i was able to create the datastore on PBS without error.
 
Last edited:
  • Like
Reactions: anzigo and titux
Hello Hannes,

after playing around with many different parameters and spending a lot of time i gave up because i did not get working Datastores on mounted Synology NAS either.

There is only one configuration i got working, but i think this is a really dirty workaround ;-)

1. I installed PBS as a VM on my PVE Cluster
2. I added my Synology NFS share as a PVE image storage to my cluster
3. I created a virtual raw disk drive for my PBS VM, stored on the PVE NFS image storage
4. I mounted the virtual drive within my PBS VM as a local drive, and created a PBS Datastore on it.

That works :-/

Kind Regards,

Andreas
This is working fine for me. Thank you
 
Hi everyone,

i found the solution for NFS mounts from Synology NAS get the error "Error: EPERM: Operation not permitted" when trying the nfs mount to use as datastore in Proxmox Backup Server. It is a user right issue with the folder on the synology nas. I created the user backup and group backup on my synology, changed the uid and guid on synology nas side to the uid and guid from PBS user backup via ssh and reboot synology. Than i was able to create the datastore on PBS without error.
This also worked for me using TrueNAS (FreeNAS). There was no need to reboot the NAS. For the NFS share, you'll need to set Maproot User and Maproot Group to the created user with the matching UID and GID.
 
Hello Hannes,

after playing around with many different parameters and spending a lot of time i gave up because i did not get working Datastores on mounted Synology NAS either.

There is only one configuration i got working, but i think this is a really dirty workaround ;-)

1. I installed PBS as a VM on my PVE Cluster
2. I added my Synology NFS share as a PVE image storage to my cluster
3. I created a virtual raw disk drive for my PBS VM, stored on the PVE NFS image storage
4. I mounted the virtual drive within my PBS VM as a local drive, and created a PBS Datastore on it.

That works :-/

Kind Regards,

Andreas
That the only way ?
Not possibility to add directly NFS to PBS ?
On my side have this error : EPERM: Operation not permitted

Best Regards
 
Hi everyone,

i found the solution for NFS mounts from Synology NAS get the error "Error: EPERM: Operation not permitted" when trying the nfs mount to use as datastore in Proxmox Backup Server. It is a user right issue with the folder on the synology nas. I created the user backup and group backup on my synology, changed the uid and guid on synology nas side to the uid and guid from PBS user backup via ssh and reboot synology. Than i was able to create the datastore on PBS without error.
Hello @angelkiller,
I am facing same problem could you please help me on that

when you said:

"I created the [U]user backup[/U] and [U]group[/U] backup on my synology, changed the uid and guid on synology nas side to the uid and guid from PBS user backup via ssh and reboot synology. Than i was able to create the datastore on PBS without error."

After you created the user and group for backup may I know how did you do that:
changed the uid and guid on synology nas side to the uid and guid from PBS user backup via ssh

Thank you so much for you help in advance.
 
Last edited:
This also worked for me using TrueNAS (FreeNAS). There was no need to reboot the NAS. For the NFS share, you'll need to set Maproot User and Maproot Group to the created user with the matching UID and GID.
@anzigo it's about 3 days I'm facing same problem could you please tell me how/where did you set Maproot Group? because I am not having this on synology nas that is what I can have ↓

1633697670351.png
Thank you so much in advance for your help.
 
Last edited:
Hi All,

i found a solution for my problem ...

I used CIFS mount and setting the noperm mount option did the job for me ...
This works for sync jobs on Synology share too ...

Kind Regards,

Andreas
Hello @kno_andreas,

I am facing same problem and have tried a lot however nothing works for me yet.!

Could you please share your complete mount command that you used, if possible?

Thank you so much for your help in advance.
 
After plenty of experimentation, this is what worked for us.

How to Mount Synology NFS Share on Proxmox Backup Server

Synology DSM 6.2.4-25556 Update 3, with BTRFS volume (required) [1.2.3.4]
Proxmox Backup Server 2.1-1 [1.2.3.5]


On Synology [1.2.3.4]:

1. Create Shared Folder 'xxxx' on a BTRFS Volume (volume1 in this case), and give 'admin' Read/Write permission.
2. NFS Permissions tab: Privilege: Read/Write, Squash: No mapping, Security: sys, Enabled Async (checked), Allow Connections (unchecked), Allow Subfolders (checked).



On PBS [1.2.3.5]:

3. Create and Mount 'xxxx'

mkdir /mnt/xxxx mount 1.2.3.4:/volume1/xxxx /mnt/xxxx


4. Add Datastore 'xxxx' using Backing path: /mnt/xxxx
5. Open/Refresh Datastore page (you should see Error 13 on 'xxxx')
6. Umount 'xxxx'


umount /mnt/xxxx


On Synology:

7. Open Shared Folder 'xxxx', NFS Permissions, and change Squash: Map all users to admin
8. Browse to 'xxxx' and Delete '.lock' file



On PBS:

9. Remount 'xxxx'

mount 1.2.3.4:/volume1/xxxx /mnt/xxxx

10. Open/Refresh Datastore page (Error 13 should clear)
11. Perform host backup on a Proxmox Node to verify (e.g., /etc folder which is usually small). This assumes you've already connected Node to PBS (add Cluster Storage PBS Server).


proxmox-backup-client backup nodeABC-etc.pxar:/etc --repository 1.2.3.5:xxxx


Notes

I suspect this process highlights a bug in PBS datastore creation. It requires 'backup' uid/gid 34:34 to create the .chunks folders, but seems to prefer root after creation (for UI and client backups). It wasn't necessary to create a 'backup' user on Synology; that just led to uid/gid headaches.
 
After plenty of experimentation, this is what worked for us.

How to Mount Synology NFS Share on Proxmox Backup Server

Synology DSM 6.2.4-25556 Update 3, with BTRFS volume (required) [1.2.3.4]
Proxmox Backup Server 2.1-1 [1.2.3.5]


On Synology [1.2.3.4]:

1. Create Shared Folder 'xxxx' on a BTRFS Volume (volume1 in this case), and give 'admin' Read/Write permission.
2. NFS Permissions tab: Privilege: Read/Write, Squash: No mapping, Security: sys, Enabled Async (checked), Allow Connections (unchecked), Allow Subfolders (checked).



On PBS [1.2.3.5]:

3. Create and Mount 'xxxx'

mkdir /mnt/xxxx mount 1.2.3.4:/volume1/xxxx /mnt/xxxx


4. Add Datastore 'xxxx' using Backing path: /mnt/xxxx
5. Open/Refresh Datastore page (you should see Error 13 on 'xxxx')
6. Umount 'xxxx'


umount /mnt/xxxx


On Synology:

7. Open Shared Folder 'xxxx', NFS Permissions, and change Squash: Map all users to admin
8. Browse to 'xxxx' and Delete '.lock' file



On PBS:

9. Remount 'xxxx'

mount 1.2.3.4:/volume1/xxxx /mnt/xxxx

10. Open/Refresh Datastore page (Error 13 should clear)
11. Perform host backup on a Proxmox Node to verify (e.g., /etc folder which is usually small). This assumes you've already connected Node to PBS (add Cluster Storage PBS Server).


proxmox-backup-client backup nodeABC-etc.pxar:/etc --repository 1.2.3.5:xxxx


Notes

I suspect this process highlights a bug in PBS datastore creation. It requires 'backup' uid/gid 34:34 to create the .chunks folders, but seems to prefer root after creation (for UI and client backups). It wasn't necessary to create a 'backup' user on Synology; that just led to uid/gid headaches.
thank you, this is the real solution currently.
 
  • Like
Reactions: homunk

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!