Find the answer to your Linux question:
Results 1 to 2 of 2
I have 2 servers /etc/fstab file on server1: server2:/var/www/html/folder1 /mnt/share1 nfs owner,rw 0 0 /etc/exports file on server2: /var/www/html/folder1 server1(rw,sync) On server 1, when folder isn't mount ls -al drwxr-xr-x ...
  1. #1
    Just Joined!
    Join Date
    Sep 2009
    Posts
    3

    How does NFS set the owner and group for a mapped folder ?

    I have 2 servers

    /etc/fstab file on server1:
    server2:/var/www/html/folder1 /mnt/share1 nfs owner,rw 0 0

    /etc/exports file on server2:
    /var/www/html/folder1 server1(rw,sync)


    On server 1, when folder isn't mount

    ls -al
    drwxr-xr-x 2 dummy7 dummy7 4096 Aug 28 14:31 share1

    vi /etc/passwd
    dummy2:504:504::/home/dummy2:/bin/bash
    dummy7:510:510::/home/dummy7:/bin/bash

    On server 2

    vi /etc/passwd
    dummy2:508:508::/home/dummy2:/bin/bash
    dummy7:510:511::/home/dummy7:/bin/bash


    I don't understand why , when I run "service netfs restart" the owner rights on the mounted folder on server 1 change from user dummy7 to dummy2. How is that set ?

    drwxr-xr-x 2 dummy7 dummy7 4096 Aug 28 14:31 share1

    to

    drwxr-xr-x 2 dummy2 dummy7 11222 Aug 26 17:06 share1


    Thanks for your help .

  2. #2
    Linux Enthusiast
    Join Date
    Aug 2006
    Location
    Portsmouth, UK
    Posts
    539
    Hi ch123,

    NFS uses user and group ID's i.e. the numbers not the names.

    What has happend is that the user and group id's don't match on both servers.
    RHCE #100-015-395
    Please don't PM me with questions as no reply may offend, that's what the forums are for.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...