LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 01-08-2010, 08:51 PM   #1
narnie
Member
 
Registered: Jan 2010
Distribution: Linux Mint, Ubuntu Netbook Edition, et al
Posts: 108

Rep: Reputation: 17
[SOLVED]Can't see contents of mounted home dir on client (not as simple as it sounds)


Hello,

I have a few Ubuntu 9.10 laptops I'm trying to learn NFS sharing with. I am just experimenting on this right now, so no harsh words about the security of what I'm playing with, please

Below are the configs

/etc/exports on host

Code:
/home/woodnt/Homeschool 192.168.1.0/24(rw,async,no_root_squash)
/home/share/HomeSchool 192.168.1.0/24(rw,async,no_root_squash)
/HomeSchool 192.168.1.0/24(rw,async,no_root_squash)
/home 192.168.1.0/24(rw,async,no_root_squash)
/ 192.168.1.0/24(rw,async,no_root_squash)
mounts on client

Code:
toshiba-laptop:/home/woodnt/Homeschool on /mnt/mnt1 type nfs (rw,addr=192.168.1.54)
toshiba-laptop:/home/share/HomeSchool on /mnt/mnt2 type nfs (rw,addr=192.168.1.54)
toshiba-laptop:/HomeSchool on /mnt/mnt3 type nfs (rw,addr=192.168.1.54)
toshiba-laptop:/ on /mnt/mnt4 type nfs (rw,addr=192.168.1.54)
toshiba-laptop:/home on /mnt/mnt5 type nfs (rw,addr=192.168.1.54)
on the host machine, /bin and /home have the same permissions:

Code:
woodnt@toshiba-laptop$ ls -dl home bin
drwxr-xr-x  2 root root 4096 2009-12-22 23:21 bin
drwxr-xr-x 16 root root 4096 2009-12-23 20:45 home
also on the host machine /home/woodnt and /HomeSchool have the same permissions:

Code:
woodnt@toshiba-laptop$ ls -ld /home/woodnt /HomeSchool/
drwxr-xr-x  2 woodnt woodnt 4096 2010-01-08 18:48 /HomeSchool/
drwxr-xr-x 95 woodnt woodnt 4096 2010-01-08 20:21 /home/woodnt
Also, these have the same permissions on the host machine.

Code:
woodnt@toshiba-laptop$ ls -ld /bin/bash /home /home/2009-12-22-22-img-of-os/ /home/2009-12-22-22-img-of-os/parts 
-rwxr-xr-x  1 root root 917960 2009-09-14 00:08 /bin/bash
drwxr-xr-x 16 root root   4096 2009-12-23 20:45 /home
drwxr-xr-x  2 root root   4096 2009-12-22 16:34 /home/2009-12-22-22-img-of-os/
-rwxr-xr-x  1 root root      5 2009-12-22 16:34 /home/2009-12-22-22-img-of-os/parts
From the client:
Code:
woodnt@luke-netbook:/mnt/mnt4$ ls -ld bin bin/bash
drwxr-xr-x 2 root root   4096 2009-12-22 23:21 bin
-rwxr-xr-x 1 root root 917960 2009-09-14 00:08 bin/bash
woodnt@luke-netbook:/mnt/mnt4$ ls home
woodnt@luke-netbook:/mnt/mnt4$

And I can see /bin, everything in /bin like /bin/bash, but not /home and any home contents.

I have the same GID and UID on both boxes (1000, not that that matters).

On the client with everything mounted as above, I can:

ls the contents of /bin, /home (via /mnt/mnt5), /, /home/woodnt/Homeschool/, /home/share/HomeScool, and /HomeSchool.

When I am on the mountpoint /mnt/mnt4 where the whole root directory is mounted and I " $ ls /mnt/mnt4/home " I get bupkis. Nada. Zilch.

Why can I see /home mounted on /mnt/mnt5 but not as a subdir of / when from the /mnt/mnt4?

I'm the same user in the same group logged into the same mountpoints on every one, but I can see inside the host /home when it is mounted directly, but not when it is mounted as root and cd'd too.

What gives?

Thanks for the help in advance,

Narnie

Last edited by narnie; 01-09-2010 at 08:58 PM. Reason: Solved
 
Old 01-08-2010, 11:23 PM   #2
narnie
Member
 
Registered: Jan 2010
Distribution: Linux Mint, Ubuntu Netbook Edition, et al
Posts: 108

Original Poster
Rep: Reputation: 17
Angry

I set it up similarly on the same computer exporting only the root (/) directory. Same problem. Can't be a user/group problem or permission problem because it is the same user on the same computer/

The mount of root is to /mnt/mnt1

Notice the permissions below. I even cp -a /bin/bash /home just to have the same file with the same permissions and yet I can't see bash in /mnt/mnt1/home

Really crazy. This is duplicated on another pair of computers setups as well. not just this computer and the netbook above.

Code:
woodnt@toshiba-laptop / $ ls -ld /mnt/mnt1/home/ mnt/mnt1/bin/
drwxr-xr-x 2 root root 4096 2009-12-22 23:21 mnt/mnt1/bin/
drwxr-xr-x 2 root root 4096 2009-12-22 16:43 /mnt/mnt1/home/
woodnt@toshiba-laptop / $ ls -ld bin/ home/
drwxr-xr-x  2 root root 4096 2009-12-22 23:21 bin/
drwxrwxrwx 16 root root 4096 2010-01-08 23:10 home/
woodnt@toshiba-laptop / $ ls -l bin/bash home/bash 
-rwxr-xr-x 1 root root 917960 2009-09-14 00:08 bin/bash
-rwxr-xr-x 1 root root 917960 2009-09-14 00:08 home/bash
woodnt@toshiba-laptop / $ ls -ld /mnt/mnt1/home/ mnt/mnt1/bin/
drwxr-xr-x 2 root root 4096 2009-12-22 23:21 mnt/mnt1/bin/
drwxr-xr-x 2 root root 4096 2009-12-22 16:43 /mnt/mnt1/home/
woodnt@toshiba-laptop / $ ls /mnt/mnt1/home/ mnt/mnt1/bin/
mnt/mnt1/bin/:
bash                  dumpkeys    mktemp          sh
bunzip2               echo        more            sh.distrib
bzcat                 ed          mount           sleep
bzcmp                 egrep       mountpoint      stty
bzdiff                false       mt              su
bzegrep               fgconsole   mt-gnu          sync
bzexe                 fgrep       mv              tailf
bzfgrep               fuser       nano            tar
bzgrep                fusermount  nc              tempfile
bzip2                 grep        nc.traditional  touch
bzip2recover          gunzip      netcat          true
bzless                gzexe       netstat         ulockmgr_server
bzmore                gzip        ntfs-3g         umount
cat                   hostname    ntfs-3g.probe   uname
chgrp                 ip          open            uncompress
chmod                 kbd_mode    openvt          unicode_start
chown                 keyctl      pidof           vdir
chvt                  kill        ping            which
cp                    less        ping6           zcat
cpio                  lessecho    ps              zcmp
dash                  lessfile    pwd             zdiff
date                  lesskey     rbash           zegrep
dbus-cleanup-sockets  lesspipe    readlink        zfgrep
dbus-daemon           ln          rm              zforce
dbus-uuidgen          loadkeys    rmdir           zgrep
dd                    login       rnano           zless
df                    ls          run-parts       zmore
dir                   lsmod       sed             znew
dmesg                 mkdir       setfont
dnsdomainname         mknod       setupcon

/mnt/mnt1/home/:
woodnt@toshiba-laptop / $
again, nothing under /mnt/mnt1/home

errrrrrr
 
Old 01-09-2010, 08:57 PM   #3
narnie
Member
 
Registered: Jan 2010
Distribution: Linux Mint, Ubuntu Netbook Edition, et al
Posts: 108

Original Poster
Rep: Reputation: 17
Problem solved

Well, I have the problem solved.

I failed to mention that /home is on another partition. Another person from another forum pointed this out as a possibility.

NFS won't export a mountpoint on another filesystem. That is why it shows up when mounted by itself.

The only workaround is just exporting them both.

Narnie
 
  


Reply



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
contents of 'home' directory found at sda5: mounted as /home, and also on sda6:/home leswatson Linux - Newbie 4 04-18-2008 04:02 PM
NIS : Home dir not mounted p_test Linux - Networking 2 03-11-2006 10:28 AM
unable to mount /home dir in a client machine abhishek124 Linux - Networking 18 06-06-2005 07:57 AM
howto have the client home dir on a server green-ears Linux - Networking 7 09-25-2003 07:17 PM
nis client login - user home dir not fnd synfield Linux - Networking 0 03-27-2003 03:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:40 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration