Recently I'm asked to manger our lab servers. Unfortunately, I'm quite new to server works. Now I get stuck in nfs & active directory.
My server env is :
- A Synology NAS acts as active directory server.
- A large storage server using FreeNAS OS, already joined the domain, also as a NFS server.
- A computation server as a NFS client, already join the domain.
The problem is the mounted directory shown in the NFS client cannot be correctly accessed by domain users.
$ id /nfs_tmp <- the mounted point
File: /nfs_tmp
Size: 3 Blocks: 1 IO Block: 32768 directory
Device: 35h/53d Inode: 4 Links: 3
Access: (0775/drwxrwxr-x) Uid: ( 479001111/ user02) Gid: (479000513/domain users)
Access: 2020-06-23 13:55:40.255628181 +0800
Modify: 2020-06-15 20:49:47.447107736 +0800
Change: 2020-06-21 15:53:52.292194006 +0800
Birth: -
$ id user02
uid=479001111(user02) gid=479000513(domain users) groups=479000513(domain users)
However, user02 still do not have write permission of the folder even the uid/gid matches. The NFS used NFSv4 protocol, default sys authentication. Notice that the uid/gid is different in NFS client and server machine. If NFSv3 is used, the info will become:
File: /nfs_tmp
Size: 3 Blocks: 1 IO Block: 32768 directory
Device: 35h/53d Inode: 8 Links: 3
Access: (0775/drwxrwxr-x) Uid: (21111/ UNKNOWN) Gid: (20513/ UNKNOWN)
Access: 2020-06-21 16:36:00.654237334 +0800
Modify: 2020-06-15 20:50:44.558142090 +0800
Change: 2020-06-21 15:53:52.292239730 +0800
Birth: -
Notice that Uid:21111 and Gid:20513 is the id in NFS server.
BTW, NFSv3 still not work with error 'permission denied'.
Very appreciate if there is any clue on this issue.
Thank you so much.