Nfs – Mounting Windows NFS share from RHEL7 – uid/gid show as 4294967294

nfspermissionsrhel7windows-server-2012

I need to mount a directory on a Windows Server 2012 system with rw access for local user apache. If I mount with defaults:

server2012:/sharedir            /appfolder            nfs     defaults

The resulting permissions are:

drwx------.   2 4294967294 4294967294   64 Mar  7 13:40 appfolder

Apache is not able to read or write to this folder.

Setting uid/gid in fstab results in:

[~]# mount /appfolder
mount.nfs: an incorrect mount option was specified

If I try to change permissions on /appfolder as root, I get

[~]# chown -R apache:apache /appfolder/
chown: changing ownership of ‘/appfolder’: Permission denied

What do I need to do to either mount the Windows NFS share as apache, or change permissions to apache after the fact?

Best Answer

EDIT: this actually didn't work (yet). The mounted share now shows with the correct UID/GID, but that user cannot access the files or directories. I'm getting an input/output error.


This isn't ideal, but technically works. I reconfigured NFS Sharing on the shared folder in Server2012 to allow anon access with specified UID/GID. The share is only open to one IP and both systems are behind multiple firewalls.

After restaring NFS Sharing on Server 2012 and remounting the shared drive in RHEL, the mounted folder has correct permissions.

If there is a better way (without Kerberos) I'd still like to know how.

enter image description here

Related Topic