0

So I do know that by default when we mount; the user/group ownership is set to uid=0=gid when belongs to the root and I read that in the mount man page.

The weird thing is I am mounting an NFS share in /oradata which is a directory that I have created as follows:

[root@sandbox ~]# mkdir /oradata
[root@sandbox ~]# chown oradata:oinstall /oradata

Then am doing the NFS mount:

[root@sandbox ~]# mount -t nfs -o rw,hard,rsize=1048576,wsize=1048576,vers=3,tcp ip_address:/oracle_test  /oradata

Now after the mount the ownership of /oradata sometimes changes to root:root and sometimes it stays as oracle:oinstall as pre-mounting.

My question is why this behavior is random? Shouldn't it always change ownership after mounting to root?

P.S: I am also using Azure Volume Storage for NFS.

aboria
  • 1

1 Answers1

0

the user/group ownership is set to uid=0=gid when belongs to the root and I read that in the mount man page.

I think this is an incorrect assumption. Where did you found this information? When you mount some filesystem, original directory content & permissions becomes "invisible". Instead mounted filesystem (even for network ones) permissions takes place if target supports them (as NFS do). I.e. the permissions you see after mounting are the ones which are set on target NFS server export.

NStorm
  • 1,248
  • 7
  • 18