Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NFS Question
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Slurp53
Apprentice
Apprentice


Joined: 14 Jun 2002
Posts: 255
Location: Iowa

PostPosted: Sun Jan 19, 2003 10:25 pm    Post subject: NFS Question Reply with quote

I am trying to use NFS between by Gentoo box and a Suse box. The Gentoo box is the server. The setup works fine between to Gentoo boxes. If I try to add a Suse box in the mix, it will mount the file system OK on the Suse box but will not allow me get at the files, says I don't have the correct permissions. I have believe the problem to be the differenct in the UID's between the two systems. Gentoo uses a uid=1000 for the file system I want to export and Suse uses a uid=500 for the owner of the files system it is being mounted in. For example I want to export /home/chris on the server and mount at /home/chris/gentoo on the client. The uid of the file system on the server is 1000 and the uid of the file system on the client is 500. How do I sync up the uid to make this work?

:?: :?:
_________________
"Welcome to the Pleasuredome" -- Frankie Goes to Hollywood
Back to top
View user's profile Send private message
linut
n00b
n00b


Joined: 07 Dec 2002
Posts: 18

PostPosted: Mon Jan 20, 2003 7:26 pm    Post subject: Reply with quote

I can't answer your uid question, but I have the same setup (gentoo nfs server - suse8.0 client) working fine. May I ask, did you specify no_root_squash in your exports file? This seems to be necessary for write access to the server. Here is my exports file:
Code:

# /etc/exports: NFS file systems being exported.  See exports(5).

/home/exports 192.168.1.101(rw,no_root_squash)

Hope this helps.
Back to top
View user's profile Send private message
Praxxus
Apprentice
Apprentice


Joined: 26 Nov 2002
Posts: 193
Location: Indiana, US

PostPosted: Mon Jan 20, 2003 10:00 pm    Post subject: Reply with quote

In order for your NFS setup to work, the UID/GID permissions have to match up. Do you want the SuSE user to have write access??

Two options come to mind:
1) Synch up the UIDs. On the SuSE box, you would need to (as root) edit the /etc/passwd file and change the UID to match the UID on the Gentoo box, then issue a chown -R command on the user's home directory to get it under the ownership of the new UID.

2) Make both UIDs on the different systems part of a unique Group ID, and give that GID ownership of the home directory on the NFS server. You could then give the group read or write access, as you wished. For example, if you created an "nfschris" group, make sure "chris" is a member of that group on all machines, then:
Code:
 chown -R chris.nfschris ~chris
on the NFS server. If you want the remote "chris" to have write access:
Code:
 chmod 2770 ~chris

Should make sure that all files created in ~chris are owned by "nfschris"


linut: Root squash is your friend! You should not disable it! A remote root user should NOT be able to write to the NFS server!!!!
_________________
My glaucoma just got worse!
Back to top
View user's profile Send private message
S_aIN_t
Guru
Guru


Joined: 11 May 2002
Posts: 488
Location: Ottawa

PostPosted: Tue Jan 21, 2003 1:57 am    Post subject: Reply with quote

i had a similar problem. but in my case the mount_nfs command (the client is running on the freebsd machine) would not mount anything on the machine with gentoo (my desktop). so, after synching the uids everything started working fine... thanks for the tip..

well done.
Back to top
View user's profile Send private message
Slurp53
Apprentice
Apprentice


Joined: 14 Jun 2002
Posts: 255
Location: Iowa

PostPosted: Tue Jan 21, 2003 4:53 am    Post subject: Reply with quote

I solved the problem after trying a couple of the suggestions. I had things so screwed up I ended up doing a reinstall. On the reinstall I changed the uid to 1000. Everything worked exactly as it should have. Thanks for the help..

:lol: :lol:
_________________
"Welcome to the Pleasuredome" -- Frankie Goes to Hollywood
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum