LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   NFS: Empty directories on Client side (https://www.linuxquestions.org/questions/linux-networking-3/nfs-empty-directories-on-client-side-37223/)

mjgeiger 12-03-2002 03:48 PM

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

KevinJ 12-03-2002 06:02 PM

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

acid_kewpie 12-03-2002 06:33 PM

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.

mjgeiger 12-03-2002 11:39 PM

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 ......

te_conway 12-04-2002 07:34 AM

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?

mjgeiger 12-04-2002 09:52 AM

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

te_conway 12-04-2002 10:38 AM

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.

mjgeiger 12-04-2002 02:04 PM

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

te_conway 12-04-2002 03:02 PM

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


All times are GMT -5. The time now is 11:45 PM.