NFS (Network File System) for Beginners

Yogesh Raheja

Yogesh working as a Consultant in Unix Engineering by profession. And he has multiple years experience in Solaris, Linux , AIX and Veritas Administration. He has been certified for SCSA9, SCSA10, SCNA10, VXVM, VCS, ITILv3. He is very much passionate about sharing his knowledge with others. Specialties: Expertize in Unix/Solaris Server, Linux (RHEL), AIX, Veritas Volume Manager, ZFS, Liveupgrades, Storage Migrations, Cluster deployment (VCS and HACMP) and administration and upgrade on Banking, Telecom, IT Infrastructure, and Hosting Services.

Loading Facebook Comments ...

12 Responses

  1. Ram says:

    Thanks Yogesh for the detail explanation of NFS.

  2. Michael says:

    @ Yogesh nice explanation mate 

    Well here if you take up NFS by default who ever access the NFS share the nfs server sees the user as anonymous no matter even if he is superuser at nfs client it  assigns the UID of nobody and hence tho he is being a superuser he may not be able to write or read etc etc on the share .

    Its always better have a clear picture on the user accessiblity and give -o anon=0 while sharing using share -F nfs -o rw,-anon 0 -d “test NFS sharing” /usr/nfstest this says that whoever access the share the NFS would assign the anonymous id to be of “0” that is root 

  3. Yogesh Raheja says:

    @Michael, thanks for this nice info.

  4. Michael says:

    @ Yogesh i do have a doubt here in NFS the authentication happens only based on the server so what would happen if someone who does su on the client and impersonates as root ..arent we compromising on security here ?but this is neverthless case for unix 

    • Ramdev says:

      @Michael, I guess you have answered your self, partially, in your previous comment. I.e every user who ever access the nfs share will be treated as nobody user, even the root@client.

      If we want to assign a specific UID for all incoming users we can use anon parameter, but One important thing to keep in mind while using anon=0, by enabling this option on server configuration you will end up with saying that who ever have access to that mount point from the client they will be treated as root and can able to modify/delete root owned files in that mount point, so it is not really recommendable .

      There are ways to solve this issue in more controlled manner by configuring nfs to use nis and netgroup based user authentication.

  5. Santosh says:

    Hi Ramdev,
    if we want to share the files to few people then what is the command? i mean i don’t want to give the access to all the users in the network, i want to give permission to only a few people to access that NFS folder.
    then what are the steps for that?

  6. ramdev says:

    @santosh – it is possible to share the files to specific users, specific machines and group of users …. to implement the solution you should create a netgroup with the listed users and then  share the directory  with  “-o rw = netgroup-name” option.

  7. Santosh says:

    creating a netgroup means creating that netgroup with listed users in NIS?
    if not in NIS can you let me know how to create Netgroup?
    and also what is the difference between group and Netgroup.

  8. ramdev says:

    @santosh – netgroups will work only when joined with nis/ nis+ / ldap… and please look page for more information. It is not exactly talkign about nfs permissions, but still it will give you an idea on how netgroups works.

  9. Vishal Mandle says:

    Yogesh, Good explaination.. can you please add up the difference between NFS Version 3 and version 4.

  1. September 15, 2015

    […] NFS (Network File System) for Beginners […]

  2. September 16, 2015

    […] Read – NFS Beginners Guide […]

Leave a Reply

Your email address will not be published.

[contact-form to='' subject='New Learning Request Submitted'][contact-field label='Name' type='name' required='1'/][contact-field label='Email' type='email' required='1'/][contact-field label='Learning Request' type='textarea' required='1'/][contact-field label='Are you Looking for ' type='radio' required='1' options='Paid Training,Free Training'/][/contact-form]

What is your Learning Goal for Next Six Months ? Talk to us