NFS - some success

brad.mugleston at comcast.net brad.mugleston at comcast.net
Wed Sep 7 00:34:08 UTC 2005


On Tue, 6 Sep 2005, Rick Stevens wrote:

> brad.mugleston at comcast.net wrote:
> > Well, with your help I finally got NFS working- mostly - my
> > problem was a services issue - I looked at both machines and set
> > them up the same and then it worked.
> >
> > I can now see the shared drived from my client machine but I
> > can't write to them (even as root on my client machine).
> >
> > /etc/exports (Server)
> > /music 192.168.1.0/255.255.255.0(rw)
> > /photos 192.168.1.0/255.255.255.0(rw)
>
> Er, you want to add "no_root_squash" to those to give the root user on
> the clients full access.  Otherwise, root on the clients gets mapped to
> UID/GID nobody.
>
> > /etc/fstab (client)
> > 192.168.1.55:/music /mnt/music nfs rw,hard,intr 0 0
> > c1911a1:/photos /mnt/photos nfs rw,hard,intr 0 0
> >
> > note - in one (music) I gave the IP the other (photos) I gave the
> > name which is mapped in the hosts file just to make sure they
> > both worked.
> >
> > When I try to write to either the /mnt/music or /mnt/photos
> > directory using vim I get the following error on saving the file:
> >
> > "test.txt" E212: Can't open file for writing
> >
> >
> > In both of the original directories I have a test file that I can
> > open and read.  In order for this to be seemless the way I want
> > it both of these directories need to be read/write available to
> > everyone.
>
> You should also check the permissions on the mountpoints BEFORE you
> mount the NFS.  NFS will inherit the permissions of the mountpoints, so
> those have to be right first.
>
> Also verify you have lockd (nfslock) running.
> ----------------------------------------------------------------------
> - Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
> - VitalStream, Inc.                       http://www.vitalstream.com -
> -                                                                    -
> -    If Windows isn't a virus, then it sure as hell is a carrier!    -
> ----------------------------------------------------------------------
OK, I added no_root_squash to /etc/exports and  proto=tcp, user,
_netdev,auto to fstab.

nfslock is running

chmod 777 to /mnt/music and /mnt/photos when these were not
mounted

Now I can read and WRITE as root but only read as a user.

As a user "brad" on the client and as a user "brad" on the server
both with the same password I thought I should be able to
read/write.

Here are my new files:

/etc/exports on the server
# /home 192.168.1.0/255.255.255.0(rw,no_root_squash)
/music 192.168.1.0/255.255.255.0(rw,no_root_squash)
/photos 192.168.1.0/255.255.255.0(rw,no_root_squash)



/etc/fstab on the client
LABEL=/                 /                       ext3    defaults
1 1
LABEL=/boot             /boot                   ext3    defaults
1 2
none                    /dev/pts                devpts
gid=5,mode=620  0 0
none                    /proc                   proc    defaults
0 0
none                    /dev/shm                tmpfs   defaults
0 0
/dev/hda8               swap                    swap    defaults
0 0
/dev/fd0        /mnt/floppy          auto
noauto,owner,kudzu,rw 0 0
/dev/hda5       /D2     vfat
auto,defaults,uid=500,gid=500,umask=000 0 0
/dev/hda1       /C      vfat
auto,defaults,uid=500,gid=500,umask=000 0 0
//SAM/C         /SAM/C  smbfs
credentials=/root/.smbpasswd,uid=500,gid=500 0 0
//SAM/D         /SAM/D  smbfs
credentials=/root/.smbpasswd,uid=500,gid=500 0 0
//SAM/E         /SAM/E  smbfs
credentials=/root/.smbpasswd,uid=500,gid=500 0 0
//SAM/F         /SAM/F  smbfs
credentials=/root/.smbpasswd,uid=500,gid=500 0 0
//SAM/music     /D/mp3  smbfs
credentials=/root/.smbpasswd,uid=500,gid=500 0 0
/dev/cdrom      /mnt/cdrom         udf,iso9660
noauto,owner,kudzu,ro 0 0
/dev/cdrom1     /mnt/cdrom1        udf,iso9660
noauto,owner,kudzu,rw 0 0
192.168.1.55:/photos /mnt/photos   nfs
proto=tcp,user,_netdev,auto,rw 0 0
C1911A1:/music /mnt/music          nfs
proto=tcp,user,_netdev,auto,rw 0 0

Thank you guys are great - we are SOOO close.  Is there anything
else you need to see?

Brad




More information about the Redhat-install-list mailing list