Gentoo Archives: gentoo-user

From: Alan McKinnon <alan@××××××××××××××××.za>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] nfs error: "permission denied" when executing a command
Date: Thu, 19 Jul 2007 07:37:50
Message-Id: 200707190937.01327.alan@linuxholdings.co.za
In Reply to: [gentoo-user] nfs error: "permission denied" when executing a command by Marco Calviani
1 On Wednesday 18 July 2007, Marco Calviani wrote:
2 > Hi,
3 > i have a problem with NFS. A partition mounted on machine gentoo1
4 > is correctly exported and mounted in gentoo2 (that is, it is possible
5 > to read and write on it). However whenever i try to execute a program
6 > from gentoo2 that it is stored on the exports of gentoo1, i get the
7 > "Permission denied" error. What can be the cause of this?
8 >
9 > This is my /etc/exports located on gentoo1.
10 >
11 > /pippo0 gentoo1(sync,no_subtree_check,rw)
12 > /pippo1 gentoo1(sync,no_subtree_check,rw)
13 >
14 > and this is the gentoo2 /etc/fstab relevant part:
15 >
16 > gentoo1:/pippo0 /pippo0 nfs rw,user,auto 0
17 > 0 gentoo1:/pippo1 /pippo1 nfs rw,user,auto 0
18 > 0
19
20 I find the usual cause of this is either:
21
22 - trying to run programs as root, in which case the nfs server will
23 squash the gentoo2 request from root to user nobody (uid 65533 or
24 such). Solution is no_root_squash option in /etc/exports, usual
25 warnings about running as untrusted root apply
26 - mismatched uids between the two machines. You may well have a user joe
27 on both machines but that doesn't mean they have the same uid. You'll
28 need to have some kind of centralised user management system in place
29 for this (such as NIS), or dream up some scheme using groups, or
30 manually sync the /etc/passwd files on both machines
31
32 alan
33
34
35 --
36 Optimists say the glass is half full,
37 Pessimists say the glass is half empty,
38 Developers say wtf is the glass twice as big as it needs to be?
39
40 Alan McKinnon
41 alan at linuxholdings dot co dot za
42 +27 82, double three seven, one nine three five
43 --
44 gentoo-user@g.o mailing list