磁盘挂载与权限

今天发现一个挺不错的事情:

首先,我新添加了一块盘sdg,然后格式化mount到了自己创建的路径test下,然后给它修改权限chown oracle:dba /test,我并没有设置开机自动挂载。

然后,我reboot

[root@rac1 ~]# ll /
total 36
lrwxrwxrwx.   1 root   root        7 May 27 20:31 bin -> usr/bin
dr-xr-xr-x.   3 root   root     4096 May 27 20:57 boot
drwxr-xr-x   19 root   root     3320 Jul 13 15:14 dev
drwxr-xr-x. 133 root   root     8192 Jul 13 15:14 etc
drwxr-xr-x.   6 root   root       53 Jun  8 11:31 home
lrwxrwxrwx.   1 root   root        7 May 27 20:31 lib -> usr/lib
lrwxrwxrwx.   1 root   root        9 May 27 20:31 lib64 -> usr/lib64
drwxr-xr-x.   3 root   root       17 May 31 13:39 media
drwxr-xr-x.   2 root   root        6 Mar 13  2014 mnt
drwxr-xr-x.   4 root   root       30 May 31 16:38 opt
dr-xr-xr-x  259 root   root        0 Jul 13  2016 proc
drwxrwxrwx    2 oracle dba      4096 Jun 20 11:42 rmanbak
dr-xr-x---.  15 root   root     4096 Jun 12 13:58 root
drwxr-xr-x   34 root   root     1100 Jul 13 15:15 run
lrwxrwxrwx.   1 root   root        8 May 27 20:31 sbin -> usr/sbin
drwxr-xr-x.   2 root   root        6 Mar 13  2014 srv
dr-xr-xr-x   13 root   root        0 Jul 13 15:14 sys
drwxr-xr-x    2 root   root        6 Jul 13 15:11 test                  -----权限是root  root
drwxrwxrwt.  20 root   root     4096 Jul 13 15:22 tmp
drwxr-xr-x    3 root   oinstall   16 May 31 14:48 u01
drwxrwxr-x    3 oracle oinstall   16 May 31 14:48 u02
drwxr-xr-x.  15 root   root     4096 Jun 12 20:09 usr
drwxr-xr-x.  22 root   root     4096 Jul 13 15:14 var
然后我mount后查看:

[root@rac1 ~]# mount /dev/sdg /test

[root@rac1 ~]# ll /
total 37
lrwxrwxrwx.   1 root   root        7 May 27 20:31 bin -> usr/bin
dr-xr-xr-x.   3 root   root     4096 May 27 20:57 boot
drwxr-xr-x   19 root   root     3320 Jul 13 15:14 dev
drwxr-xr-x. 133 root   root     8192 Jul 13 15:14 etc
drwxr-xr-x.   6 root   root       53 Jun  8 11:31 home
lrwxrwxrwx.   1 root   root        7 May 27 20:31 lib -> usr/lib
lrwxrwxrwx.   1 root   root        9 May 27 20:31 lib64 -> usr/lib64
drwxr-xr-x.   3 root   root       17 May 31 13:39 media
drwxr-xr-x.   2 root   root        6 Mar 13  2014 mnt
drwxr-xr-x.   4 root   root       30 May 31 16:38 opt
dr-xr-xr-x  261 root   root        0 Jul 13  2016 proc
drwxrwxrwx    2 oracle dba      4096 Jun 20 11:42 rmanbak
dr-xr-x---.  15 root   root     4096 Jun 12 13:58 root
drwxr-xr-x   34 root   root     1100 Jul 13 15:15 run
lrwxrwxrwx.   1 root   root        8 May 27 20:31 sbin -> usr/sbin
drwxr-xr-x.   2 root   root        6 Mar 13  2014 srv
dr-xr-xr-x   13 root   root        0 Jul 13 15:14 sys
drwxr-xr-x    3 oracle dba      1024 Jul 13 15:11 test       ---权限就这样改变了!!
drwxrwxrwt.  20 root   root     4096 Jul 13 15:23 tmp
drwxr-xr-x    3 root   oinstall   16 May 31 14:48 u01
drwxrwxr-x    3 oracle oinstall   16 May 31 14:48 u02
drwxr-xr-x.  15 root   root     4096 Jun 12 20:09 usr
drwxr-xr-x.  22 root   root     4096 Jul 13 15:14 var



你可能感兴趣的:(Linux,Linux入门及进阶)