possible solution for userid mapping problem
Subsystems (2)
Hi all,
I have an NFS server exporting a directory to another machine. This directory is used by an application server on the NFS server host. The application server runs under a special uid/gid, and the exported directory is owned and only accessible by this special user.
The same application server runs on the NFS client host, and I want this application server to use the same directory via NFS (from application server's point of view there is no problem using a "shared directory" in this context).
The only problem: the special user used for the application server has different uids/gids on both hosts. Since I had to learn, that there is no "official" way to map different uids, I think about mapping *all* userids to the application servers userid as "anonuid".
So on the NFS server the exports file would contain
/var/lib/appserver/data 1.2.3.4/32(rw,async,all_squash,anonuid=123,anongid=123)
(where the application servers special user account has uid=gid=123).
The NFS client would mount this directory normally via
mount -t nfs 4.3.2.1:/var/lib/appserver/data /var/lib/appserver/data
So I hope to give the NFS-clients-application-server-user (uid=gid=456) access to the data of the NFS-servers-application-server-user (uid=gid=123).
Quoted 1 line
From the technical point of view this seems to work (I've tested this
setup successfully). My actual question is, if it is *nice* to do this (because it seems to me like a kind of hack), and if there is maybe a better solution for this?
TIA
Regards
-stefan-
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs