[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

NFS Access setup

Posted on 2006-03-29
5
Medium Priority
?
655 Views
Last Modified: 2012-06-27
Hello...
I have three Linux boxes - l1, l2 and l3.
l1 is making three directories available using this exports file:
/z1      10.50.1.0/24(rw,anonuid=509,anongid=600)
/z2      10.50.1.0/24(rw,anonuid=509,anongid=600)
/z3      10.50.1.0/24(rw,anonuid=509,anongid=600)
#/z1      10.50.1.0/24(rw,anonuid=509,anongid=600) 10.50.2.0/24(rw,anonuid=509,anongid=600)
#/z2      10.50.1.0/24(rw,anonuid=509,anongid=600) 10.50.2.0/24(rw,anonuid=509,anongid=600)
#/z3      10.50.1.0/24(rw,anonuid=509,anongid=600) 10.50.2.0/24(rw,anonuid=509,anongid=600)

I can open and write to nfs mounted directories when logged into l2 with this fstab file:
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/VolGroup_ID_14268/LogVol1 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
none                    /proc                   proc    defaults        0 0
none                    /sys                    sysfs   defaults        0 0
/dev/VolGroup_ID_14268/LogVol2 /tmp                    ext3    defaults        1 2
/dev/VolGroup_ID_14268/LogVol5 /usr                    ext3    defaults        1 2
/dev/VolGroup_ID_14268/LogVol4 /var                    ext3    defaults        1 2
/dev/VolGroup_ID_14268/LogVol0 swap                    swap    defaults        0 0
/dev/VolGroup_ID_14268/LogVolHome /home                ext3    defaults        1 2
# LABEL=/home-7612             /home                   ext3    defaults        1 2
sierra:/z1      /sierra/z1      nfs      bg,soft,intr      0      0
sierra:/z2      /sierra/z2      nfs      bg,soft,intr      0      0
sierra:/z3      /sierra/z3      nfs      bg,soft,intr      0      0
/dev/hda                /media/cdrom            auto    pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0

The problem is when I copied the fstab part from l2 that starts with sierra and pasted it into fstab of l3 and mounted them from l1 to l3, I can open the files but can not write to them when logged into l3.

what should be looking into to fix?

thanks in advance.


0
Comment
Question by:mehranalmasi
  • 2
  • 2
5 Comments
 
LVL 27

Expert Comment

by:Nopius
ID: 16329514
run 'id' command on l3 (from that user, who is not able to write files on nfs share):
and post output here
0
 
LVL 3

Expert Comment

by:leisner
ID: 16329775
what are the IP addresses of the machines?

What is the error message?

when it fails, report the IDS (as above) and paste the outputof
touch foo
Also do:
ls -ld .
wherever we're trying to write.

0
 

Author Comment

by:mehranalmasi
ID: 16337869
id
uid=605(username) gid=602(ae) groups=602(ae) context=user_u:system_r:unconfined_t

ip address of l3 is 10.50.1.31

touch foo
touch: cannot touch 'foo': permission denied

ls -ld
drwxr-xr-x 50 702 700 4096 mar 27 17:22
0
 

Author Comment

by:mehranalmasi
ID: 16338556
Hi
I found the problem. The user did not belong to the write group. here is the configuration and you will get the points if you explain to me the mechanics of this setup in L2 and L3:

group in /etc
av:/x/700:user1

passwd in /etc
av:/x:700:700:av:/home/nfs:sbin/nologin

ls -l when in sierra:
drwxrwxr-x 11  av  av  4096 Mar 30 16:36 z1
same thing for z2 and z3


thanks.





0
 
LVL 27

Accepted Solution

by:
Nopius earned 500 total points
ID: 16339971
Try to append user1 who cannot write to /etc/group on L1 (where share is located):
av:*:700:user1

this appends that user to additional group (which is checked when accessing local to L1 files).
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month18 days, 17 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question