Gentoo Archives: gentoo-amd64

From: Sami Samhuri <sami@××××××××××.com>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] nfs mount has now become read-only
Date: Tue, 04 Apr 2006 02:36:50
Message-Id: 4431DB19.3090509@no-eff-eks.com
In Reply to: [gentoo-amd64] nfs mount has now become read-only by Mark Knecht
1 Mark Knecht wrote:
2 > Hello,
3 [...]
4 > There have been no changes or updates of any kind to the remote
5 > machine that has the NFS directory exported. Normal updates have been
6 > occurring on my AMD64 machine so presumably the problem is on this
7 > machine as none of the remote files are writable anymore. One thing I
8 > notice is that on the remote machine there are some directories and
9 > files which have user names and some which only have numbers like 501,
10 > 502, etc.
11 >
12 > Where would I start looking for what's changed?
13
14 The file system stores a user id for the owner and group. ls looks up the user
15 id in /etc/passwd and shows you the username instead. You can make ls show user
16 id's instead of names with `ls -ln`.
17
18 When you see numbers such as 501 in the directory listing that means the user or
19 group who had that user id is not found in /etc/passwd or /etc/group.
20
21 The user id's on all the machines you use with NFS have to be the same. I found
22 this in the HP-UX documentation via google:
23
24 >>>> From: http://docs.hp.com/en/5991-1153/ch02s01.html#bghdjbfa
25
26 To Set User IDs and Group IDs (if neither NIS nor NIS+ is used)
27
28 * Create one /etc/passwd file and one /etc/group file that contain all the users
29 and groups on the network, and then copy these files to all the machines on the
30 network.
31
32 or
33
34 * Edit the /etc/passwd and /etc/group files on each machine to ensure that the
35 following conditions are true:
36
37 o Each user has the same user ID on all machines where that user has an account.
38
39 o No two users anywhere on the network have the same user ID.
40
41 o Each group has the same group ID on all machines where that group exists.
42
43 o No two groups on the network have the same group ID.
44
45 When users request NFS access to remote files, their user IDs and group IDs are
46 used to check file ownership and permissions, just as they are locally.
47
48 If a user has one user ID on an NFS client and a different user ID on an NFS
49 server, the server will not grant the user access to his or her files on the
50 server, because it thinks the files belong to someone else.
51
52 If a user on one machine has the same user ID as a user on another machine, one
53 user may gain access to the other user's files.
54
55 >>>>
56
57 Perhaps your user ids don't match. I've been bitten by this before sharing
58 between Mac OS X, Gentoo, and Ubuntu. Hope this helps.
59
60 --
61 Sam
62 --
63 gentoo-amd64@g.o mailing list

Replies

Subject Author
Re: [gentoo-amd64] nfs mount has now become read-only Mark Knecht <markknecht@×××××.com>