LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-21-2012, 11:44 AM   #1
cp.moncy
LQ Newbie
 
Registered: Apr 2012
Posts: 6

Rep: Reputation: Disabled
Export file permission using NFS


Hello all,

It is my first post here. I have question regarding the NFS plus automount home directory - permission

scenario :

1) I can mount the /ldaphome/ldapuser from nfs server to client - has rw permissions

2) Automount is working as expected.

3) Server shows right permission for the files and folder

4) Authentication with ldap server setup

5) However, the permission of the files in client server CANNOT change and displays as xxxxx number.

server -

[root@server /]# id ldapuser
uid=500(ldapuser) gid=100(users) groups=100(users)
[root@server /]# grep ldapuser /etc/passwd | awk -F: '{print $6}'
/ldaphome/ldapuser

root@server /]# cat /etc/exports
/ldaphome 192.168.1.100(rw,no_root_squash,sync)
[root@server /]# cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.1.1 server.example.com server
[root@server /]# /etc/init.d/rpcidmapd status
rpc.idmapd (pid 1094) is running...
Client
------
[ldapuser@client ~]$ grep ldapuser /etc/passwd
[ldapuser@client ~]$ id ldapuser
uid=500(ldapuser) gid=100(users) groups=100(users)
[ldapuser@client ~]$ ll file
-rw-r--r-- 1 4294967294 4294967294 0 Apr 21 10:03 file
[ldapuser@client ~]$ ll file
-rw-r--r-- 1 4294967294 4294967294 0 Apr 21 10:03 file
[ldapuser@client ~]$ chown ldapuser:users file
chown: changing ownership of `file': Invalid argument

Both client and server are centOS 6.2 version.

Did I any missed key information here? Comments are appreciated.

Thanks

Last edited by cp.moncy; 04-21-2012 at 12:15 PM.
 
Old 04-21-2012, 12:30 PM   #2
cp.moncy
LQ Newbie
 
Registered: Apr 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
On client side I was started the "rpcidmap" services, now it shows as nobody user instead on random number.

[ldapuser@client ~]$ ll file
-rw-r--r-- 1 nobody nobody 0 Apr 21 10:03 file

But still how do I map the real username and group to the cliet side ?
 
Old 04-21-2012, 12:33 PM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
I've run into this recently. Looks like you're running NFS version 4, which has additional security protocols and requires access map goodies to make it work (I've been meaning to look into the details, but have not had the chance; unfortunately, I've never been able to get idmapd working quite correctly). Try using NFS version 3 and see if that clears up the issue. To do so, you must add nfsvers=3 to the options in your automount configuration file to force version 3 (also be sure portmapper is running on both client and server). The big downside is that NFSv3 is quite a bit less secure than version 4 in terms of ID mapping. However, for a small network with only trusted clients it works well for me (which, I guess, is why I've never looked at all the bits and pieces necessary to get v4 working). YMMV.
 
Old 04-21-2012, 03:09 PM   #4
cp.moncy
LQ Newbie
 
Registered: Apr 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thank you for your quick reply - btmiller. I have solved this with single user and group by placing these values in mapping section for both server and client's idmapd.conf file. Now I am looking for bigger picture for multiple users.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] fstab or export options needed to write to an nfs mounted ntfs export chief427 Linux - General 2 07-21-2011 08:07 AM
xfs, inode64, NFS export, no_subtree_check and "Stale NFS file handle" message mcacciagrano Red Hat 1 01-16-2011 04:25 PM
[SOLVED] NFS export multiple mounted file systems under a single root AdamDaughterson Linux - Server 2 07-28-2009 02:28 PM
export NFS mounted file system via NFS smkamene Linux - Networking 3 02-10-2009 04:12 PM
NFS and the export file Veteq Linux - Networking 2 01-20-2006 09:19 AM


All times are GMT -5. The time now is 01:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration