Openhabian mount nfs share for backup

Hi community!

I’ve been playing around with openhabian on a raspberry pi 4. Now I’d like to use it seriously and therefore have a good backup strategy. I decided to use Amanda which requires to mount a nfs share which causes some trouble.

I created following nfs share on my synology NAS:

on my openhabian I created the folder /storage/diskstation with openhabian:openhabian as owner and following fstab line: /storage/diskstation nfs nolock,noatime 0 0

Now I can mount it with “sudo mount /storage/diskstation” which appears to work. But if i try to cd into the directory I get following error:
-bash: cd: /storage/diskstation/: Permission denied

I think the problem might be, that in my nas the user openhabian has UID 1036 and the group openhabian has GID 65540. On the raspberry pi the UID is 1000 and GID 1000.

Is it plausible that this can be the source of my permission problem. And how can I solve this? I don’t think I can (or should) change the id’s on my NAS. So, is it possible to change it on the openhabian system to match the NAS?

Thank you very much for your help!

Hi, you can use the squash option to map all users to admin.

Regards, Christian


Thank you for your reply. I was following the tutorial from this page and they write explicitely to avoid squash:
“Another specific thing to watch out for when configuring your export share on the NFS server is to add the no_root_squash option”

Therefore I’m uncertain if this solution is feasible or not.

No they don’t tell you to avoid it, do they. “Watch out” != “avoid”.
(FWIW I wrote that tutorial so I know it is not meant like you read it)

Ah I apologise. I’m afraid English is not my native language and therefore I must have misunderstood this.
I now tried it with mapping all users to admin and it seems to work fine. Thank you very much for the clarification!