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?

  • windows sends user principals, but your client fails to map them to local ids. – kofemann Apr 15 '16 at 12:55
  • So windows is sending 4294967294 as its user principle? Is it possible to configure Windows to send 48 instead? – a coder Apr 15 '16 at 13:06
  • Can you mount the share as nfsv3? – Andy Apr 16 '16 at 9:12
  • Haven't actually tried that yet. What will that change in what I'm attempting to do? – a coder Apr 16 '16 at 12:44

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

  • I think "allow unmapped user access" is the one you are looking for. – kofemann Apr 18 '16 at 6:15
  • @kofemann when I select that, restart NFS and remount - the mounted directory has UID:GID of 4294967294 (per original question). .... No matter what UID:GID I enter in the config window above.. I can't access files or read directories - even by the actual user showing ownership. I get the input/output error. – a coder Apr 18 '16 at 9:11
  • I will double check firewall settings with sysconfig when I'm back to a console.. maybe I didn't open up NFS traffic. – a coder Apr 18 '16 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.