-2

I’m having a very strange problem with ownership of files in an NFS share.

All of the servers that I'm using are CentOS 6.5, and the version of nfs-utils that I'm using is nfs-utils-1.2.3-39.

On my storage server (where the actual NFS share exists), I have a tomcat user and a tomcat group, with a user ID of 91 and a group ID of 91. I can create the directories that I want to share and chmod them to tomcat:tomcat.

On my client server, I can successfully mount the shared space. I also have a tomcat user and a tomcat group, with a user ID of 91 and a group ID of 91. I create files and directories inside the share from my client server, with the files being owned by tomcat:tomcat.

On the storage server, I can indeed see that the new files now exist and are owned by tomcat:tomcat. But on the client server, the files are owned by nobody:nobody (uid:gid of 99:99).

After a bit of digging, I reverted the client server, deleted the contents of the shared directories and changed the ownership of the shared directories on the storage server to nobody:nobody (uid:gid of 99:99), then I rebuilt the client server. The same problem still exists.

What am I doing wrong, and how can I resolve it? I need the shared directories to be owned by tomcat:tomcat, and I need to be able to create files from the client server inside the shared directories, with the files also owned by tomcat:tomcat.

RikSaunderson
  • 3,505
  • 6
  • 32
  • 50

1 Answers1

0

On your NFS-server, you have root_squash set - all requests to NFS are then translated into an anonymous user (this is the normal NFS behaviour). Reconfigure your NFS if needed.

Markus
  • 84
  • 3