LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 12-03-2002, 03:48 PM   #1
mjgeiger
LQ Newbie
 
Registered: Mar 2002
Location: Stoughton, MA
Distribution: Gentoo 1.4rc?, it's all good.....
Posts: 19

Rep: Reputation: 0
NFS: Empty directories on Client side


Hi,

I have two computers on my LAN that I would like to share files between. On the server side, the following things were added:

/etc/exports
/mnt/share 192.168.0.2(rw)

/etc/hosts.allow
portmap:192.168.0.2
lockd:192.168.0.2
mountd:192.168.0.2
statd:192.168.0.2
rquotad:192.168.0.2

/etc/hosts.deny
ALL:ALL

exportfs -ra was then run and nfs already starts at boot.

On the client side I ran the following command:

mount 192.168.0.3:/mnt/share /nfs
^(the IP of the server)

When I cd to the /nfs I get the two directories, music and video (which is correct), but changing into these directories shows nothing.

Both have the 2.4.19 kernel on them. The LAN is setup on a machine running 2.2.22 kernel and ipchains.

I am not sure of a few things:

1 - Are there any special services I have to start at boot for this?
2 - Do I have this code setup correctly?
3 - Do I have to enable any new rules for IPChains?
4 - Any special options for the kernel?
5 - Any thing else you can think of?

Any help is greatly appreciated.

Thanks,
Matt
 
Old 12-03-2002, 06:02 PM   #2
KevinJ
Member
 
Registered: Feb 2001
Location: Colorado Springs, CO
Distribution: Redhat v8.0 (soon to be Fedora? or maybe I will just go back to Slackware)
Posts: 857

Rep: Reputation: 30
On the server... what does "ls -l /mnt/" show the permissions of "share" as? How about the directorys inside of "share"?

On the client, after mounting, what does "ls -l /" show the permisions of "nfs" as?
... "ls -l /nfs" ?
... "ls -l /nfs/music"? (just show for any one file)
... "ls -l /nfs/video"? (just show for any one file)

-Kevin
 
Old 12-03-2002, 06:33 PM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,386

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
are you sharing a native file system, or something such as fat32? NFS won't touch fat32 due to it's total lack of file ownership and other such handy and secure things.
 
Old 12-03-2002, 11:39 PM   #4
mjgeiger
LQ Newbie
 
Registered: Mar 2002
Location: Stoughton, MA
Distribution: Gentoo 1.4rc?, it's all good.....
Posts: 19

Original Poster
Rep: Reputation: 0
acid_kewpie,

They are all ext3 partitions.

KevinJ,

SERVER
/mnt/share:
drwxrwxrwx 4 root root .....

/mnt/share/music:
drwxrwxrwx 6 root root ......

/mnt/share/video:
drwxrwxrwx 3 root root .....

CLIENT
/nfs:
drwxrwxrwx 4 root root ....

/nfs/music:
drwxr-xr-x 2 root root ......

/nfs/video:
drwxr-xr-x 2 root root ......
 
Old 12-04-2002, 07:34 AM   #5
te_conway
Member
 
Registered: Apr 2001
Location: MA
Distribution: redhat 7.2
Posts: 182

Rep: Reputation: 30
Root has no permissions for security reasons
If you need to do this:

on the server
/mnt/share 192.168.0.2(rw,no root squash)

But I would ssh to the server for root. NFS, like samba is a method to share ordinary user files. Do you really want to make the entire root file system avaible to a client machine?
 
Old 12-04-2002, 09:52 AM   #6
mjgeiger
LQ Newbie
 
Registered: Mar 2002
Location: Stoughton, MA
Distribution: Gentoo 1.4rc?, it's all good.....
Posts: 19

Original Poster
Rep: Reputation: 0
te_conway,

I am not trying to share my whole file system, just a directory. I am just looking to share some music and videos I have on one computer with another.

Also, I tried changing the groups for all directories to 'users' but I am still getting the same result.

One other thing of interest is that each directory on my SERVER side is a partition of a hard drive. Do you think this may cause the problem?

Thanks
 
Old 12-04-2002, 10:38 AM   #7
te_conway
Member
 
Registered: Apr 2001
Location: MA
Distribution: redhat 7.2
Posts: 182

Rep: Reputation: 30
I believe each partion has to be a differnet share.
I'm a little rusty on this but if your server mount point is /mnt/share then exports should be
/share 192.168.0.2(rw) NOT /mnt/share
On the client you created a directory under /mnt called nfs and you would then mount 192.168.0.3:/share /mnt/nfs

The client you're logging attaching from obviously needs rights to these directories, to cover all bases temporarily set the permisions to 777 so anyone can see the files, if it works you can change the right back to whatever you want.
 
Old 12-04-2002, 02:04 PM   #8
mjgeiger
LQ Newbie
 
Registered: Mar 2002
Location: Stoughton, MA
Distribution: Gentoo 1.4rc?, it's all good.....
Posts: 19

Original Poster
Rep: Reputation: 0
Thanks te_conway!

The problem was that each partition had to be a different share. I mounted them each individually, and experienced no problems what so ever.

I also tried the /mnt/share -> /share, but that did not work. But who cares it works now.

I will work on the permissions and groups now, and see how far I get with that.

Thanks,
Matt
 
Old 12-04-2002, 03:02 PM   #9
te_conway
Member
 
Registered: Apr 2001
Location: MA
Distribution: redhat 7.2
Posts: 182

Rep: Reputation: 30
Great, if /mnt/share is the actual partition name then that would be correct. If not maybe it's a version thing, I'm using RH7.2 and I export home directories as /home

-tom
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
client side NFS files? bobbens Linux - Networking 3 11-01-2004 02:52 AM
client-side firewall setup that works with NFS niverson Linux - Security 5 02-21-2004 11:13 PM
NFS - group permision problems on client side top001 Linux - Networking 1 02-12-2004 02:08 PM
help with client side NFS-firewall setup and server side NIS-firewall setup niverson Linux - Networking 3 02-02-2004 08:52 AM
Client side firewall setup for NFS niverson Linux - Networking 0 12-31-2003 02:00 PM


All times are GMT -5. The time now is 05:27 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration