LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   nfs mount permission denied, over diff over 2 networks (https://www.linuxquestions.org/questions/linux-general-1/nfs-mount-permission-denied-over-diff-over-2-networks-355263/)

dtzWill 08-20-2005 03:07 PM

nfs mount permission denied, over 2 diff networks
 
K so i followed the instructions in the NFS howto regarding how to configure nfs. What i'm trying to do is setup my linux pc to share it's large drive of music, movies, etc, w/my laptop (which has a small hd). The pc is connected wirelessly to a 2wire router, and a windows box is also connected to that router via wireless. My laptop is connected to that win comp via crossover cable. the win comp shares the router cnxn via ics.

my prob is when i try:
mount 172.16.1.30:/40 /music
i get an error abt 'permission denied'
172.16.1.30 is the ip of the hosting pc.
the ip of the win box is 172.16.1.34
and the laptop is 192.168.0.149

the exports file on the pc contains:

/40/ *(rw,no_root_squash) nat-dtz(rw,no_root_squash) 192.168.0.149(rw,no_root_squash)

i used the asterisk in hopes it would enable the sharing to all computers.....

i added nat-dtz bc that's the name of the win box and i read in the howto that if u get a 'permission denied' error than ssh from the client to the box, and type 'who' and add to the exports file what it lists u as there.

in hosts.allow i put ALL:ALL and hosts.deny is blank

why does it deny me permission then? help would be much appreciated. thanx

also i can mount the drive on the pc like this
mount localhost:/40 /mnt/40
and that works fine, so i think that means nfs is working happily...
i'm muchos lost, pls help

also the linux pc is running slack 10.0, the win box XP, the laptop slax installed on the hd. Someone mentioned in another forum that not having portmap running was the prob so i dled and installed a tgz for it, and ran rpc.portmap--still getting that error, maybe i didn't run it right?

also i thought maybe i should bridge the cnxns on the win box as to avoid probs being on a diff network.... but can't get that to work but that's not a q to be answer in a linux forum, is it? lol
pls pls pls help me
also alternatives to get my desired result (shared music/movies streamable from linux pc) are fine, i'm not attached to using nfs.

Brian1 08-20-2005 03:41 PM

I could be wrong here but NFS does not like crossing the class c subnets.
Other than that things to check or try.
Is there any firewall runing on any of the PC's? If so disable them all.

Your explanation of your network is kind of confusing to me, but here are a few thoughts.
Is the nfs server and the client laptop on the same class C subnet? Like 192.168.0.0/255.255.255.0.
This is where I would start have both pc and laptop on the same network connected to the same switch or router. So in the end the server is say 192.168.0.100 and the laptop is 192.168.0.101. Change to your perference.

Lets stop here and see what answers we get back.

I would use a line like this for the /etc/exports file.
/40/ 192.168.0.0/255.255.255.0(rw,async,no_root_squash)

Another thought is the username you are connecting with on both PC and laptop?

Brian1

dtzWill 08-20-2005 04:37 PM

i can't connect my laptop to the router bc i don't have a wireless card for it--altho i hope to get one soon.

and i'm not sure what u meant abt usernames, on both i'm root, in hopes of getting rid of any permission errors.


if what i'm trying to do is impossible for nfs, any ideas what else to try? mounting the files locally would be very very nice..... any suggestions?

i made the change to exports, and no luck. still server says 'permission denied'

all firewalls are turned off

Brian1 08-20-2005 08:41 PM

What kind of router do you have?
Does it have two ports one for the external wan internet? (cable,dsl)
Then the other is a single network connection.
Or it only wireless?

From what I can tell I don't think your current setup will work. You are working with to different classes of IP's. The 172.xxx.xxx.xxx is a class B and 192.168.xxx.xxx is a class C network.

If I understand this you connect the laptop to the windows machine with a crossover cable.
The windows machine has an ip 172.16.1.34 and this is the wireless IP?
Now there is a nic card in the Windows box and what IP is it using?
I assume it something in the 192.168.0.XXX.
If that is so whay not use 172.16.1.100. Then use 172.16.1.159 on the laptop.
Just a thought here.



Quick trip over to friends house to look over the setup I created for him.
1 pc and 1 laptop connect hardwire ethernet to a cable/dsl router with an internal ip of 192.168.4.1/255.255.255.0. All machines use static IP's

Pc configuration
ip 192.168.4.100/255.255.255.0 gateway 192.168.4.1(this is the router)
exports file contents
Code:

/storage1/ 192.168.4.0/255.255.255.0(rw,sync)
laptop Configuration
ip 192.168.4.150/255.255.255.0 gateway 192.168.4.1
mountpoint created on laptaop at /mnt/pc_storage1
mount command ' mount -t nfs -o rw 192.168.1.100:/storage1 /mnt/pc_storage1 '.

No firewalls running on either machine since they are behind a router.
Same usernames created on both machines.

If this does not help then the only other thought is setup samba networking.

Hope this helps. Good luck.
Brian1

dtzWill 08-20-2005 09:22 PM

thank u very much for your help/time. I tried doing that and it still gave me that annoying 'permission denied' deal. So i'm gonna try samba, thanx for the suggestion.

edit: i tried it, and woohoo it works. only prob is amarok and juk don't load tags right.
i posted again under 1811016 bc it was a diff prob, and the title no longer applies. Thanx again, brian.


All times are GMT -5. The time now is 04:07 PM.