2

I use CentOs as nfs server nad 2 Centos machines as clients. I have some problems with permisions/ownership for new files/directories created from clients on nfs share.

My exports file:

/media/nfsshare *(rw,sync,no_root_squash)

And my idmap.conf:

[Mapping]
Nobody-User = nobody
Nobody-Group = nobody

Finally, fstab on clients:

172.18.2.132:/media/nfsshare /shared-disk nfs rw,addr=<ip> 0 0

I set /shared-disk permissions to 777 and all clients can create/delete files on mounted share. But:

  • I don't want 777 permissions. I rather need 660
  • Every file created by clients has owner: '-2 - user #-2' and group '-2'. I want to ownership for user who created file - system users for each client has the same ids, groups and group ids.

Any tips?

9
  • I think this is a CentOS 5 installation and it has a rather odd behavior. If you have the possibility go for CentOS 6 + NFSv4. Apr 16, 2014 at 7:34
  • Version: Red Hat Enterprise Linux Server release 6.5 (Santiago) I can't update to newer. Behavior like this is rather unacceptable. Any help..?
    – Guest500
    Apr 16, 2014 at 7:37
  • Is idmap running on both server and clients? Apr 16, 2014 at 7:40
  • How to check this? I have only nfs and nfslock services, there is nothing related to idmap
    – Guest500
    Apr 16, 2014 at 7:49
  • There is something related to idmap in system log (on server): Apr 14 13:55:03 NFSLB rpc.idmapd[7511]: nss_getpwnam: name '500' does not map into domain 'localdomain'
    – Guest500
    Apr 16, 2014 at 8:00

1 Answer 1

-1

Try changing your exports file to...

/media/nfsshare *(rw,sec=sys,sync,no_root_squash)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .