大网数据广告活动
服务器运维问答

NFS: control file/folder access using groups on the server

· 52CE 我爱测

I feel a bit stupid to ask as it feels to me to be a very basic question, but anyway I haven't found a solution yet: I have a Linux dataserver and several workstations that mount folders on this dataserver using NFS. The system i…

问题原文

原帖链接 · hcr · CC BY-SA 4.0

I feel a bit stupid to ask as it feels to me to be a very basic question, but anyway I haven't found a solution yet:

I have a Linux dataserver and several workstations that mount folders on this dataserver using NFS. The system is set up in a way that users have the same uids on both, server and workstations. There is no centralized user management, but the accounts are local accounts on the according computers.

Now I would like to control the file access on the dataserver by creating groups for specific purposes and adding the according users to those groups on the server. However, when mounting the directories on the workstations, I am facing the problem that the groups only exist on the server and the workstations seem not know if a specific user is member of a group on the server. I would like to avoid creating all groups also on each of the workstations, but only manage them on the server. Is this possible?

Thanks in advance for any replies!

已采纳解答

原帖链接 · kofemann · CC BY-SA 4.0

As you are thinking about local accounts, I assume that you are using AUTH_SYS based rpc authentication. This means that client sends with each request uid and gids. IOW, the nfa server just uses group membership information provided by the clients.

There are two possibilities (that I know) to fix that:

complicated one

Use RPCSEC_GSS - the kerberized access and map user principals on the server side to desired uid and gids or query a LDAP server.

simple one

Configure the server (rpc.mountd) to start with --manage-gids option that will tell the server to ignore gids provided by the client and query it locally based on the uid.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-09-02)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。