You are not logged in.

#1 2024-02-23 22:28:57

obelisk
Member
Registered: 2021-01-10
Posts: 67

nfs4 with idmap & sec=sys between Aynology-NAS and archlinux

Hi, I have a question how to get idmapping if nfs4 running on a synology NAS DS218+ with an Archlinux dekstop-PC.

I have file access, but I don't get idmapping  with the UID and GID running. I use ssh login to NAS to verify he uid and gid. Generally:

Desktop-PC:
   uid=1000(obelisk) gid=984(users) groups=984(users)

Synology NAS:
   uid=1027(obelisk) gid=100(users) groups=100(users)


When I mount my NAS on the Desktop, and creating a new file on the NAS, then I have:

#on my desktop pc:
> ls  -l
-rwxrwx--- 1 nobody nobody 0 18. Feb 19:17 test1.txt
> ls  -ln
-rwxrwx--- 1 65534 65534 0 18. Feb 19:17 test1.txt

#and on Synology (with ssh login to the folder)
> ls -l
-rwxrwx---+ 1 1000 984 0 Feb 18 19:17 test1.txt
 > ls -ln
-rwxrwx---+ 1 1000 984 0 Feb 18 19:17 test1.txt

So, saving with my desktop new files to the Synology NAS: files saved on NAS with under the uid/gid of my desktop user. That is good.
But checking the files in terminal on my desktop have always id and uid 65534. I don't know why.

#idmapd.conf of the Synology NAS-server
cat /etc/idmapd.conf 
[General]
Verbosity = 2
Domain=SYN.COM
[Mapping]
Nobody-User=guest
Nobody-Group=users
[Translation]
Method=nsswitch
GSS-Methods=static,synomap
[Static
#idmapd.conf of the Archlinux Client
[General]
Verbosity = 2
Domain=SYN.COM
[Mapping]
[Translation]
Method = nsswitch
[Static]
[UMICH_SCHEMA]
LDAP_server = ldap-server.local.domain.edu
LDAP_base = dc=local,dc=domain,dc=edu

Mounting with fstab, with that line:

192.168.xxx.xxx:/volume1/files		/mnt/nas/files		nfs4	_netdev,noauto,sec=sys,x-systemd.automount,vers=4,x-systemd.mount-timeout=2s,timeo=14,x-systemd.idle-timeout=30s,x-systemd.requires=network-online.target	0	0

Has anybody NFS4 with idmapping between Archlinux and Synology NAS running?
How I get the idmapping running?

Offline

#2 2024-02-24 09:12:59

-thc
Member
Registered: 2017-03-15
Posts: 775

Re: nfs4 with idmap & sec=sys between Aynology-NAS and archlinux

obelisk wrote:

Has anybody NFS4 with idmapping between Archlinux and Synology NAS running?

I have a similar setup - but without idmap.

- My fstab entry is nearly the same (no "sec=sys" because it will be used anyway, no "systemd.requires")
- I didn't touch both idmapd.conf files
- I have no corresponding user on the NAS - since it's not needed

Offline

#3 2024-02-24 19:37:22

obelisk
Member
Registered: 2021-01-10
Posts: 67

Re: nfs4 with idmap & sec=sys between Aynology-NAS and archlinux

Ich have access to the NAS, that's not the problem.
My problem is that I have a shared folder, with different users who has access to the folder.  And we cannot se which files are from which user. Therefore, it would be nice to use a idmapping.
But I also doesn't want to use kerberos. Much more security is not needed. Its only local in home ethernet.

Offline

Board footer

Powered by FluxBB