LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   NFS mount permission denied! (https://www.linuxquestions.org/questions/linux-networking-3/nfs-mount-permission-denied-80583/)

naesyllek 08-10-2003 02:27 AM

NFS mount permission denied!
 
hi all

as part of my cisco course @ my local college i've started delving into the
world of linux as an extra curicular activity by having redhat 9.0 installed
on the pc i use in class.

having read an article about thin clients/diskless nodes and visiting the
www.ltsp.org i set about setting up the workstation accordingly by
downloading source files and compiling them. i had a few minor hiccups
nothing i couldn't resolve. earlier this week i managed to sucessfully get
my first diskless node working, initially in runlevel 3, then 4 and finally
5 :)

my next step was to attach a second node to the hub. despite having
configured the server i cannot get a second host to mount the NFS.
everything appears to be working correctly, the MAC address of NIC is
acknowledged by DHCP and IP address is assigned (192.168.0.2) which can be
ping'ed from server (192.168.0.254) and the first node (192.168.0.1), and
the kernel is loaded via TFTP :) until that is the NFS is mounted when i get
the following error;

< start of error>
NFS mount fails reason given: Permission denied

mount: nfsmount failed: Bad file number
NFS: mount program didn't pass remote address!
mount: Mounting 192.168.0.254:/opt/ltsp/i386 on /mnt failed: Invalid
argument

ERROR! failed to mount the root directory via NFS!
Possible reasons include;
1) NFS services may not be running on server
2) Workstation IP does not map to a hostname, either in /etc/hosts, or in
DNS
3) Wrong address for NFS server in the DHCP config
4) Wrong pathname for root directory in the DHCP

Kernel panic: Attempted to kill init!
<end of error>

i've double checked the various config's of the server, read numerous
how-to's etc... but i'm unable to sort the problem out.
please help!

cheers

sean

suhis 08-07-2004 04:38 AM

i got same error...

i did everything like ltsp documents said and it still says this error.. i have double checked everything and found no error (my opinion..) ...
i hope that somebody could help me with this one

amfoster 08-07-2004 02:10 PM

NFS permission denied
 
What is the contents of the /etc/exports file?

As an example try this:

/tmp *(rw,no_root_squash,sync)




The no root squash allows root to connect as root. Root can not usually mount an nfs share.

Then issue

exportfs -a


A qwik check running rpcinfo -p should show a bunch of mountd and nfs lines.

Then try mounting your own share on the server machine to test it

mount -t nfs 127.0.0.1:/tmp /mnt

idaho 08-07-2004 09:18 PM

To see what NFS shares are available from your NFS server, invoke:

showmount -e <server>

You can do this on the server as:

showmount -e localhost

or from the NFS clients.

suhis 08-08-2004 04:30 AM

Re: NFS permission denied
 
Quote:

Originally posted by amfoster
What is the contents of the /etc/exports file?

As an example try this:

/tmp *(rw,no_root_squash,sync)




The no root squash allows root to connect as root. Root can not usually mount an nfs share.

Then issue

exportfs -a


A qwik check running rpcinfo -p should show a bunch of mountd and nfs lines.

Then try mounting your own share on the server machine to test it

mount -t nfs 127.0.0.1:/tmp /mnt

i tried that "mount -t nfs 127.0.0.1:/tmp /mnt" and it works.. if i change that /tmp to dir where i have ltsp dir it says "mount: 127.0.0.1:/opt/ltsp-4.1-beta-1/i386/ failed, reason given by server: Permission denied" (with root login)


ill paste my /etc/exports here

/opt/ltsp-4.1-beta-1 192.168.0.0/255.255.255.0(ro,no_root_squash,sync)
/var/opt/ltsp/swapfiles 192.168.0.0/255.255.255.0(rw,no_root_squash,async)
/tmp *(rw,no_root_squash,sync)

i have tried to change those 192.168.0.0/255.255.255.0 to * but it doesn't make difference

suhis 08-08-2004 04:34 AM

Quote:

Originally posted by idaho
To see what NFS shares are available from your NFS server, invoke:

showmount -e <server>

You can do this on the server as:

showmount -e localhost

or from the NFS clients.

Export list for localhost:
/tmp *
/opt/ltsp-4.1-beta-1 192.168.0.0/255.255.255.0
/var/opt/ltsp/swapfiles 192.168.0.0/255.255.255.0

this looks right ?

sibtay 08-08-2004 02:07 PM

first do the following step

Disable the firewalls on both sides and then try the nfs mount
(i think it should work after this step)

As you 'll be knowing nfs requires the portmap daemon and the nfs daemon to be running.

Type these commands on both ends

service portmap restart
service nfs restart

this would start the necessary daemons

Try the mount again

Did it work?

Cedrik 08-08-2004 02:16 PM

I doubt but in case of...

Did you try the insecure option in /etc/exports that allow client connect from port > 1024 like:

/opt/ltsp-4.1-beta-1 192.168.0.0/255.255.255.0(insecure,ro,no_root_squash,sync)

If it fails, try set a valid uid and gid like:
/opt/ltsp-4.1-beta-1 192.168.0.0/24(ro,no_root_squash,anonuid=500,anongid=100,sync)

suhis 08-09-2004 05:56 AM

i tried those all and didn't help ...

more ideas.-..

suhis 08-09-2004 06:03 AM

and btw. now i can mount this dir with "mount -t nfs 127.0.0.1:/opt/...... /mnt" command with my server machine.

and i can't try to mount it from another machine because it's running windows 2k and it doesn't have enough space for running linux and i don't wanna get knoppix ...

suhis 08-10-2004 06:19 AM

needed (good) ideas.. please help me somebody... :)

amfoster 08-10-2004 06:31 AM

SuHIS,

Consider running cygwin from cygwin.com to provide a Linux enviroment on your NT machine. There is also uwin from uwin.org, ut cygwin will even give you X Windows, It is an easy install and the best part is that ssh will be available on your NT machine. If you are trying to mount a Linux share onto Windows, That isn't going to happen. You will need Samba on Linux to do something like that.

suhis 08-10-2004 07:42 AM

Quote:

Originally posted by amfoster
SuHIS,

Consider running cygwin from cygwin.com to provide a Linux enviroment on your NT machine. There is also uwin from uwin.org, ut cygwin will even give you X Windows, It is an easy install and the best part is that ssh will be available on your NT machine. If you are trying to mount a Linux share onto Windows, That isn't going to happen. You will need Samba on Linux to do something like that.


Im trying that ltsp system (ltsp.org)

i use floppy disk in my windows machine to boot it over tftp so it will load kernel from my server computer so it uses my server harddisk and processor etc.

you didn't understand at all what im trying to do... samba isn't right for this



ps. i'm very sorry for my bad english...

suhis 08-11-2004 08:06 AM

W: Ideas

Cedrik 08-11-2004 09:20 AM

From your client, booting on floppy, what does ' showmount -e 192.168.0.254 ' say ?


All times are GMT -5. The time now is 05:42 AM.