Go Back   The macosxhints Forums > OS X Help Requests > UNIX - General



Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Old 06-07-2003, 06:35 PM   #1
petrakis
Prospect
 
Join Date: Jun 2003
Location: Petrakis
Posts: 3
Unhappy SOLVED: was, mounting NFS linux volumes misery. Help!

Peter
Quote:
UPDATE, please see my next message in this thread for the solution.


I've been working on this most of the afternoon. I think I've tried every single combination in existance but it still doesn't work. The setup a private network 192.168.1.0/255.255.255.0 .
The mac 10.2.6 client is at 192.168.1.3
and the linux server is at 192.168.1.8. The server is running debian 3.0.

I can mount the volume fine, i just cant modify it. I've tried static mapping, squashing etc etc. nothing works. portmap is running on both sides. on the mac the output of rpcinfo -p is.

Code:
root@oracle:/# rpcinfo -p
   program vers proto   port
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
on the linux box


Code:
mystic:/sbin# rpcinfo -p
   program vers proto   port
    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp  32854  status
    100024    1   tcp  34846  status
    100003    2   udp   2049  nfs
    100003    2   tcp   2049  nfs
    100005    1   udp    767  mountd
    100005    2   udp    767  mountd
    100005    1   tcp    770  mountd
    100005    2   tcp    770  mountd
I have hostname info for both configured on the mac as oracle.alphadriven.org and mystic.alphadriven.org respectivly.

On the linux box the hosts.allow/deny look like.

Code:
ALL: .alphadriven.org: ALLOW
and
Code:
ALL: PARANOID
/etc/hosts on the linux box


Code:
127.0.0.1       localhost
192.168.1.3     oracle.alphadriven.org  oracle
192.168.1.7     afw.alphadriven.org     afw
192.168.1.8     mystic.alphadriven.org  mystic
last but not least, the /etc/exports

Code:
# /etc/exports: the access control list for filesystems which may be exported

/usr/home/voodoo        192.168.1.0/255.255.255.0(rw,insecure,map_static=/etc/nfs.map)
with /etc/nfs.map having the following


Code:
# Mapping for client oracle:
#    remote     local
uid     501     1000
gid     20      1000
#nobody
uid     4294967294      65534

I'm trying to access these volumes as the user petrakis on the mac which has the uid 501 and gid 20. On the linux server on trying to mount voodoo's home directory whos uid and gid is 1000.

Note that the uids for nobody differ between the two. The value of -2 on the mac produces a gid of 4294967294 as can also seen here. I've tried using the literal value -2 as the map value with no change.


Code:
grep nobody /etc/passwd
nobody:*:-2:-2:Unprivileged User:/dev/null:/dev/null

root@oracle:/# id nobody 
uid=4294967294(nobody) gid=4294967294(nobody) groups=4294967294(nobody
I'm mounting the share to directory 'voodoo' I created as the user petrakis on the mac. The command used is

Code:
mount -t nfs 192.168.1.8:/usr/home/voodoo /Users/petrakis/voodoo/
it mounts without delay. I can go in to the directory and list it's contents. I cannot add/delete/modify anything on that share. What is that I'm missing???
Thank you in advance.

Last edited by petrakis; 06-07-2003 at 10:30 PM.
petrakis is offline   Reply With Quote
Old 06-07-2003, 06:46 PM   #2
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 32,473
UIDs

I have only a little experience with NFS so I have only two suggestions:

1) Try creating a new user on the Mac with the same UID/GID (1000/1000) as on your Linux. (You can use NetInfo Manager to change the UIDs etc.) Try this at least as an experiment to see what happens - maybe your nfs.map file is not working for some reason.

2) Are you sure that you aren't accidentally specifying that this volume is exported read-only on Linux?
hayne is offline   Reply With Quote
Old 06-07-2003, 08:46 PM   #3
bluehz
MVP
 
Join Date: Jan 2002
Posts: 1,562
I worked on this same thing off and on for over a month... never could get anything reliable to work. Just when I thought I had it - it would stop working. I can scp via terminal faster anyway.

FYI - everything I had problems with was also related to "portmapper" and no one seemed to be able to offer any assistance in any of the forums I posted at.
bluehz is offline   Reply With Quote
Old 06-07-2003, 08:57 PM   #4
yellow
Moderator
 
Join Date: Jan 2002
Posts: 10,677
2 quickies:
Does this link help?

Or does this link help?
yellow is offline   Reply With Quote
Old 06-07-2003, 09:54 PM   #5
wgscott
Major Leaguer
 
Join Date: Sep 2002
Posts: 350
ive got a bay in the hand so cat type

chech this:

http://chemistry.ucsc.edu/%7Ewgscott..._and_fink.html
wgscott is offline   Reply With Quote
Old 06-07-2003, 10:12 PM   #6
wgscott
Major Leaguer
 
Join Date: Sep 2002
Posts: 350
Ok now I can type:

On the machine you want to export disks, you wil have (or can create) a file in /etc/exports

It should have entries like this:


/disk1 128.444.141.930 vallium.adict.org


This exports the file system /disk1 to those two computers (real names changed to protect the innocent). You can use either numerical IP or the name. If the name isn't working, try the numerical ip.

I'm not 100% certain it is required, but it certainly helps to have a static ip address on the machine you are exporting to.



Now to mount this on OS X, download NFSmanager

http://www.bresink.de/osx/NFSManager.html

Read the directions for NFS manager. They are very well written. Activate root if you haven't. (Use Netinfo; very explicit directions are on that web page and also mine).

as root or with sudo, create a mount point on your machine

mkdir /mnt/valium

or whatever.

Then use the GUI to select the computer, the mount point, and the file system to mount. Click and activate.

Normally this is all you would have to do. I found that automounter dismounts the disk when I log out which hoses my automatic backups. I figured out a workaround (turning off automount) which complicates things a little bit.

Try this first, and once you are convinced it works, then you can tweak it later.

Also, if you want to be able to write to the disk, your user id number on both machines has to be the same. if you have to reset one, remember that after you do so, you will have to run, as root,

chown -R yourname /home/yourname

(that's what it would probably look like for linux I think).

HTH.
wgscott is offline   Reply With Quote
Old 06-07-2003, 10:24 PM   #7
petrakis
Prospect
 
Join Date: Jun 2003
Location: Petrakis
Posts: 3
SOLVED:mounting NFS linux volumes misery. Help!

OK. The man page could have elaborated -alittle- more on this cavet before it ate up my entire afternoon. Note this passage from the manpage for exports.

Code:
   Anonymous Entries
       Entries  where hosts are not specified are known as anony
       mous entries.  They have different default  settings  com
       pared   to   normal   entries.   The  differences  include
       all_squash, no_secure, and ro.

Since I specified the entire subnet as a valid clients, I was squashed to nobody by default, no matter what the static_map stated . The proper way to
do it is to edit my /etc/exports entry to look like this.

Code:
# /etc/exports: the access control list for filesystems which may be exported

/usr/home/voodoo        192.168.1.3(rw,insecure,map_static=/etc/nfs.map)
The static_map I created to bridge the uid/gids WORKS. I have full access to the volume and I can FINALLY use bbedit to do my work!!!

Thank you all for your insight, I'll be setting up the automounter shortly.

BTW one of you mentioned something about starting portmapper on the mac.
in /etc/hostconfig, set RPCSERVER=-YES- and portmapper will be started at boot.

Thanks again!

Peter
petrakis is offline   Reply With Quote
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 On
HTML code is Off

Forum Jump



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


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.