SGID is added when I make directory or copy directory in nfs directory

    • SGID is added when I make directory or copy directory in nfs directory

      Hi, could someone help me about openmediavault nfs directory adding SGID?
      Even I don't want SGID, it automatically adds SGID. How I can make and copy directory without SGID?
      Following is what happened when I "mkdir" and "cp" on my machine.

      nfs server by openmediavault is "192.168.0.20".
      nfs client is "192.168.0.27".
      nfs client umask is "0022".

      ###### "mkdir" in nfs mount directory in nfs client side ######
      # mount
      (...snip...)
      192.168.0.20:/export/disk_space/share/files/backup on /backup_mnt type nfs (rw,relatime,vers=3,rsize=4096,wsize=4096,namlen=255,acregmin=0,acregmax=0,acdirmin=0,acdirmax=0,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.0.20,mountvers=3,mountport=58783,mountproto=udp,local_lock=none,addr=192.168.0.20)
      (...snip...)
      # cd /backup_mnt
      # mkdir bbb
      # ls -dal bbb
      drwxr-sr-x 2 root nogroup 4096 Apr 30 23:42 bbb

      ###### "mkdir" in local directory in nfs client side ######
      # cd /
      # mkdir aaa
      # ls -dal aaa
      drwxr-xr-x 2 root root 4096 May 1 05:06 aaa

      ###### "cp" local directory to nfs directory in nfs client side ######
      # cd /backup_mnt
      # cp -rp /aaa aaa
      # ls -dal aaa
      drwxr-sr-x 2 root root 4096 May 1 05:06 aaa

      ###### exports setting in nfs server side ######
      # cat /etc/exports
      # /etc/exports: the access control list for filesystems which may be exported
      # to NFS clients. See exports(5).
      /export/disk_space 192.168.0.27/32(rw,subtree_check,secure,no_root_squash)

      # NFSv4 - pseudo filesystem root
      /export 192.168.0.27/32(ro,fsid=0,root_squash,no_subtree_check,hide)
    • Followup from IRC

      02:04 < subzero79> gregs_ whats the issue with the setgid?
      02:05 < subzero79> just take it out from the parent directory, but every new SF (with a new folder) in omv is created with
      setgid and is hardcoded. Don't know if there is a omv env variable to control that
      02:12 < gregs_> subzero79: Thank you, I didn't know this -> "take it out from the parent directory". Now I could make and
      copy without SGID. My problem is solved.
      02:12 < subzero79> BTW what issues do you have with setgid?
      02:31 < gregs_> subzero79: I wanted backup files. So, I wanted to copy them in completely same permission. This is the
      reason why I didn't want the setgid in copy.
      02:32 < gregs_> "I wanted backup files" --> "I wanted to backup files"
      02:32 < subzero79> well you can always use the preserve permission mode
      02:32 < subzero79> if rsync is what you're using
      02:32 < subzero79> or cp
      02:35 < gregs_> subzero79: At least with "cp", preserve permissions mode "-p" didn't remove setgid as I posted.
      goo.gl/BHyJgV
      02:35 < subzero79> ok