LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-31-2012, 12:40 PM   #1
muis87
LQ Newbie
 
Registered: Mar 2012
Posts: 10

Rep: Reputation: Disabled
NFS - files/directories created with local UID/GID


Hello,

Running Centos 5 server with this export:

/mnt/backupdata2 10.0.0.141(rw,insecure,anonuid=500,anongid=505)

the client side is an OSX machine, which can write to this share.. But when a file is created, the UID and the GID on the NFS server are different.. (501 - 20)

on OSX 501 is my username.... so I think its set with the OSX UID/GID... (501 is NOT a user on the Centos 5 server)

(so the share is accessed (and have the permissions) as 500,505 (given in the export). but files/dirs are created as 501-20


on another server with same config (but centos 4) its working correct; files/dirs are created with the gived anonuid and anongid....

who can help me?

Last edited by muis87; 03-31-2012 at 12:55 PM.
 
Old 03-31-2012, 01:14 PM   #2
WizadNoNext
Member
 
Registered: Nov 2009
Posts: 140

Rep: Reputation: 9
NFS isn't accessed with spoofed uid and gid, but real one given out by OS accessing NFS. This is nature of NFS
 
Old 03-31-2012, 01:18 PM   #3
muis87
LQ Newbie
 
Registered: Mar 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by WizadNoNext View Post
NFS isn't accessed with spoofed uid and gid, but real one given out by OS accessing NFS. This is nature of NFS

Why is the same working on another server?
 
Old 04-01-2012, 06:43 AM   #4
muis87
LQ Newbie
 
Registered: Mar 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
Here is the solution:

/mnt/backupdata2 10.0.0.141(rw,async,no_subtree_check,insecure ,all_squash,anonuid=500,anongid=505)

I'm not concerned with security, as this is just a large media pc nfs. anonuid and anongid set the numeric user group and user id that exist on the server for all connected clients. all_squash means to completely ignore the clients uid and guid
 
Old 04-02-2012, 02:25 AM   #5
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint v21.3 & v22.x with Cinnamon
Posts: 1,797
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
In my experience, NFS runs in cooperation with NIS or Yellow-Pages (yp) services that keep users and groups in sync across a gaggle of network connected hosts. If you don't have yp, you need to spend some effort keeping your users and groups organized among all connected hosts. Larger sites use LDAP as a more modern replacement for NIS.

When host-A users access a drive that is physically connected to host-B, the host-A process user goes through a service on host-B that maps users and groups. For
example, user=sam maps to user=dilbert. The file write then happens using dilbert's permissions, ownership, and so on.

See Linux NFS Howto.

I hope this helps,
~~~ 0;-Dan
 
  


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
Differences between UID 0 and GID 0? dwarf007 Linux - Newbie 6 03-16-2010 05:52 AM
what is uid and gid rmanocha Linux - Software 9 08-19-2008 12:03 AM
synchronization uid and gid in the local network linderox Linux - Newbie 2 06-07-2007 04:22 AM
What is my uid/gid? Jeebizz Slackware 2 11-22-2005 12:39 PM
uid, gid don't exist, yet files owned by them, i need to delete them mattie_linux Linux - General 10 05-05-2005 04:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:47 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
Open Source Consulting | Domain Registration