Score:0

root:daemon with NFSv4.1, but not with NFSv4.0?

br flag
servername:~ # cat /etc/idmapd.conf
[General]

Verbosity = 0
Pipefs-Directory = /var/lib/nfs/rpc_pipefs
Domain = good.domain

[Mapping]

Nobody-User = nobody
Nobody-Group = nobody
servername:~ #
servername:~ # systemctl stop nfs-idmapd.service
servername:~ # systemctl start nfs-idmapd.service
servername:~ # nfsidmap -c
servername:~ # umount /usr/bar/foo
servername:~ # mount /usr/bar/foo
servername:~ # mount|grep -w /usr/bar/foo
192.168.0.12:/foo_shared_usr_bar_node2 on /usr/bar/foo type nfs4 (rw,noatime,vers=4.1,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=null,clientaddr=192.168.0.210,local_lock=none,addr=192.168.0.12)
servername:~ # su - fooadm
fooadm@servername:/usr/bar/foo/foo204> df -h .
Filesystem                Size  Used Avail Use% Mounted on
192.168.0.12:/foo_shared  256G  7.9G  249G   4% /bar2/shared/foo
fooadm@servername:/usr/bar/foo/foo204> touch testing
fooadm@servername:/usr/bar/foo/foo204> ls -lah testing
-rw-r----- 1 root daemon 0 Apr 27 15:30 testing
fooadm@servername:/usr/bar/foo/foo204> logout
servername:~ # systemctl status nfs-idmapd.service
● nfs-idmapd.service - NFSv4 ID-name mapping service
   Loaded: loaded (/usr/lib/systemd/system/nfs-idmapd.service; static; vendor preset: disabled)
   Active: active (running) since Wed 2022-04-27 15:29:35 CEST; 3min 36s ago
  Process: 34781 ExecStart=/usr/sbin/rpc.idmapd $RPCIDMAPDARGS (code=exited, status=0/SUCCESS)
 Main PID: 34782 (rpc.idmapd)
    Tasks: 1 (limit: 512)
   CGroup: /system.slice/nfs-idmapd.service
           └─34782 /usr/sbin/rpc.idmapd

Apr 27 15:29:34 servername systemd[1]: Starting NFSv4 ID-name mapping service...
Apr 27 15:29:35 servername systemd[1]: Started NFSv4 ID-name mapping service.
servername:~ #

but it works with NFSv4.0, only issue is on 4.1.

The Question: why do files get root:daemon on NFSv4.1? It works perfectly fine on NFSv4.0 (files will be created with fooadm:anditsgoodgroup)! Only diff is the version number.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.