Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
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. –  Florin Asavoaie Apr 16 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 at 7:37
    
Is idmap running on both server and clients? –  Florin Asavoaie Apr 16 at 7:40
    
How to check this? I have only nfs and nfslock services, there is nothing related to idmap –  Guest500 Apr 16 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 at 8:00

1 Answer 1

Try changing your exports file to...

/media/nfsshare *(rw,sec=sys,sync,no_root_squash)
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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