~~~
[oracle@lmsingle liming3]$ id
uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba)
~~~
oracle用户,属组是oinstall,附属属组是dba,随便创建文件,文件属组是oinstall
~~~
[oracle@lmsingle liming3]$ ll
total 0
-rw-r--r-- 1 oracle oinstall 0 Oct 26 10:41 test3.txt
~~~
使某一个文件夹下的文件创建属组默认为dba的方法:
~~~
[oracle@lmsingle liming]$ mkdir MingLee
[oracle@lmsingle liming]$ chgrp dba MingLee/
[oracle@lmsingle liming]$ chmod g+s MingLee/
[oracle@lmsingle liming]$ cd MingLee/
[oracle@lmsingle MingLee]$ touch test4.txt
[oracle@lmsingle MingLee]$ ll
total 0
-rw-r--r-- 1 oracle dba 0 Oct 26 10:47 test4.txt
~~~