* Re: [gentoo-user] nfs error: "permission denied" when executing a command
2007-07-18 19:13 [gentoo-user] nfs error: "permission denied" when executing a command Marco Calviani
@ 2007-07-18 19:25 ` Glenn Sieb
2007-07-18 22:05 ` James Ausmus
2007-07-19 7:37 ` Alan McKinnon
2 siblings, 0 replies; 5+ messages in thread
From: Glenn Sieb @ 2007-07-18 19:25 UTC (permalink / raw
To: gentoo-user
Marco Calviani wrote:
> Hi,
> i have a problem with NFS. A partition mounted on machine gentoo1 is
> correctly exported and mounted in gentoo2 (that is, it is possible to
> read and write on it). However whenever i try to execute a program
> from gentoo2 that it is stored on the exports of gentoo1, i get the
> "Permission denied" error. What can be the cause of this?
>
> This is my /etc/exports located on gentoo1.
>
> /pippo0 gentoo1(sync,no_subtree_check,rw)
> /pippo1 gentoo1(sync,no_subtree_check,rw)
>
> and this is the gentoo2 /etc/fstab relevant part:
>
> gentoo1:/pippo0 /pippo0 nfs rw,user,auto 0 0
> gentoo1:/pippo1 /pippo1 nfs rw,user,auto 0 0
First, obvious questions: Have you checked to make sure your PATH is set
correctly, or are you giving the full path to the executable? Do you
actually have the authority to run the program in question?
Another gotcha could be: Are you trying to run a program that needs to
be run as root? NFS won't let you do many rootly things over NFS unless
you add a no_root_squash to the share options in /etc/exports.
Anywho.. I hope that helps, if not solve your problem, get you on the
right track.. :)
Best,
--Glenn
--
Glenn E. Sieb
MTS - Software Applications Specialist
Yangtze Project, ALV
+1 732 949 5453
sieb@bell-labs.com
Don't forget System Administrator Day! July 27, 2007!
http://www.sysadminday.com/
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] nfs error: "permission denied" when executing a command
2007-07-18 19:13 [gentoo-user] nfs error: "permission denied" when executing a command Marco Calviani
2007-07-18 19:25 ` Glenn Sieb
@ 2007-07-18 22:05 ` James Ausmus
2007-07-19 8:31 ` Marco Calviani
2007-07-19 7:37 ` Alan McKinnon
2 siblings, 1 reply; 5+ messages in thread
From: James Ausmus @ 2007-07-18 22:05 UTC (permalink / raw
To: gentoo-user
On 7/18/07, Marco Calviani <marco.calviani@gmail.com> wrote:
> Hi,
> i have a problem with NFS. A partition mounted on machine gentoo1 is
> correctly exported and mounted in gentoo2 (that is, it is possible to
> read and write on it). However whenever i try to execute a program
> from gentoo2 that it is stored on the exports of gentoo1, i get the
> "Permission denied" error. What can be the cause of this?
>
> This is my /etc/exports located on gentoo1.
>
> /pippo0 gentoo1(sync,no_subtree_check,rw)
> /pippo1 gentoo1(sync,no_subtree_check,rw)
>
> and this is the gentoo2 /etc/fstab relevant part:
>
> gentoo1:/pippo0 /pippo0 nfs rw,user,auto 0 0
> gentoo1:/pippo1 /pippo1 nfs rw,user,auto 0 0
man mount
/user
gets you (*'s added by me for easy find):
user Allow an ordinary user to mount the file system. The
name of the mounting user is written to mtab so that he
can unmount the file system again. ****This option implies
the options noexec****, nosuid, and nodev (unless
overridden
by subsequent options, as in the option line
user,exec,dev,suid)
So, short answer, add "exec" to your mount options...
HTH-
James
>
> Any help would be appreciated,
> thanks in advance,
> marco
> --
> gentoo-user@gentoo.org mailing list
>
>
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] nfs error: "permission denied" when executing a command
2007-07-18 22:05 ` James Ausmus
@ 2007-07-19 8:31 ` Marco Calviani
0 siblings, 0 replies; 5+ messages in thread
From: Marco Calviani @ 2007-07-19 8:31 UTC (permalink / raw
To: gentoo-user
Hi James and the others,
thank you very much, this option made the trick.
Regards,
marco
On 7/19/07, James Ausmus <james.ausmus@gmail.com> wrote:
> man mount
> /user
> gets you (*'s added by me for easy find):
>
> user Allow an ordinary user to mount the file system. The
> name of the mounting user is written to mtab so that he
> can unmount the file system again. ****This option implies
> the options noexec****, nosuid, and nodev (unless
> overridden
> by subsequent options, as in the option line
> user,exec,dev,suid)
>
> So, short answer, add "exec" to your mount options...
>
>
> HTH-
>
> James
>
>
>
> >
> > Any help would be appreciated,
> > thanks in advance,
> > marco
> > --
> > gentoo-user@gentoo.org mailing list
> >
> >
> --
> gentoo-user@gentoo.org mailing list
>
>
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] nfs error: "permission denied" when executing a command
2007-07-18 19:13 [gentoo-user] nfs error: "permission denied" when executing a command Marco Calviani
2007-07-18 19:25 ` Glenn Sieb
2007-07-18 22:05 ` James Ausmus
@ 2007-07-19 7:37 ` Alan McKinnon
2 siblings, 0 replies; 5+ messages in thread
From: Alan McKinnon @ 2007-07-19 7:37 UTC (permalink / raw
To: gentoo-user
On Wednesday 18 July 2007, Marco Calviani wrote:
> Hi,
> i have a problem with NFS. A partition mounted on machine gentoo1
> is correctly exported and mounted in gentoo2 (that is, it is possible
> to read and write on it). However whenever i try to execute a program
> from gentoo2 that it is stored on the exports of gentoo1, i get the
> "Permission denied" error. What can be the cause of this?
>
> This is my /etc/exports located on gentoo1.
>
> /pippo0 gentoo1(sync,no_subtree_check,rw)
> /pippo1 gentoo1(sync,no_subtree_check,rw)
>
> and this is the gentoo2 /etc/fstab relevant part:
>
> gentoo1:/pippo0 /pippo0 nfs rw,user,auto 0
> 0 gentoo1:/pippo1 /pippo1 nfs rw,user,auto 0
> 0
I find the usual cause of this is either:
- trying to run programs as root, in which case the nfs server will
squash the gentoo2 request from root to user nobody (uid 65533 or
such). Solution is no_root_squash option in /etc/exports, usual
warnings about running as untrusted root apply
- mismatched uids between the two machines. You may well have a user joe
on both machines but that doesn't mean they have the same uid. You'll
need to have some kind of centralised user management system in place
for this (such as NIS), or dream up some scheme using groups, or
manually sync the /etc/passwd files on both machines
alan
--
Optimists say the glass is half full,
Pessimists say the glass is half empty,
Developers say wtf is the glass twice as big as it needs to be?
Alan McKinnon
alan at linuxholdings dot co dot za
+27 82, double three seven, one nine three five
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread