Debian NFS クライアント側の権限の問題

Debian NFS クライアント側の権限の問題

私の環境は次の通りです。

host1: Debian 12、zfs 2.1.11: デフォルト パッケージ、nfs-utils 2.6 を備えたオープン LDAP サーバー

host2: Debian 12: デフォルト パッケージ、nfs-utils 2.6 を備えたオープン LDAP クライアント

LDAPサーバー側では、primarygroup1とprimarygroup2の2つのグループが作成されており、ユーザーuser1はグループprimarygroup2に属しています。

サーバ側

getent group:
primarygroup1:*:1000001:
primarygroup2:*:1000002:

getent passwd:
user1:x:1000001:1000002:user1:/home/user1:/bin/false

サーバーは、NFS経由で権限を持つファイルでデータセットを提供します

NFS エキスポート:

exportfs -v
/tank/d1 <world>(sync,wdelay,hide,fsid=9a31889cb81531154198e4c3c5156b74,sec=sys,rw,secure,no_root_squash,no_all_squash)

ファイルの権限:

getfacl /tank/d1/file.txt
getfacl: Removing leading '/' from absolute path names
# file: tank/d1/file.txt
# owner: root
# group: primarygroup1
user::rwx
group::r--
other::---

クライアント側:

NFSマウント

mount
192.168.164.200:/tank/d1 on /mnt/testnfs type nfs
(rw,relatime,vers=3,rsize=524288,wsize=524288,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.164.200,mountvers=3,mountport =53721,mountproto=udp,local_lock=none,addr=192.168.164.200)

ファイルの権限

getfacl /mnt/testnfs/file.txt
getfacl: Removing leading '/' from absolute path names
# file: mnt/testnfs/file.txt
# owner: root
# group: primarygroup1
user::rwx
group::r--
other::---

getent group:
primarygroup1:*:1000001:
primarygroup2:*:1000002:

getent passwd:
user1:x:1000001:1000002:user1:/home/user1:/bin/false

問題は、クライアント側で user1 にファイルの読み取り権限がなく、primarygroup1 に属していないにもかかわらず、ファイルを読み取ることができることです。

user1@deb12nfsclient:/root$ cat /mnt/testnfs/file.txt
####### data ######

NFSサーバーを再起動して再マウントすると、時々は役立ちますが、ほとんどの場合は機能しません。さらに、約15分後には、NFSサーバーを再起動しなくても、これらの権限は自動的に正しく機能することに気付きました。

約15分後:

user1@deb12nfsclient:/root$ cat /mnt/testnfs/file.txt
cat: /mnt/testnfs/file.txt: Permission denied

クライアント側では、マウント オプション noac、actimeo=0 を使用しましたが、効果はありませんでした。

なぜこのように動作するのか知っている人はいますか? 権限が適切に機能するようにこの時間を短縮する方法はありますか?

アダムより

関連情報