Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
03-31-2012, 12:40 PM
|
#1
|
LQ Newbie
Registered: Mar 2012
Posts: 10
Rep:
|
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.
|
|
|
03-31-2012, 01:14 PM
|
#2
|
Member
Registered: Nov 2009
Posts: 140
Rep:
|
NFS isn't accessed with spoofed uid and gid, but real one given out by OS accessing NFS. This is nature of NFS
|
|
|
03-31-2012, 01:18 PM
|
#3
|
LQ Newbie
Registered: Mar 2012
Posts: 10
Original Poster
Rep:
|
Quote:
Originally Posted by WizadNoNext
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?
|
|
|
04-01-2012, 06:43 AM
|
#4
|
LQ Newbie
Registered: Mar 2012
Posts: 10
Original Poster
Rep:
|
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
|
|
|
04-02-2012, 02:25 AM
|
#5
|
Senior Member
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint v21.3 & v22.x with Cinnamon
Posts: 1,797
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 12:47 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|