Oracle RAC 集群中,对于各种资源的管理,也存在所有者与权限的问题。crs_getperm与crs_setperm则是这样的一对命令,主要用于查看与修改集群中resource的owner,group以及权限等,下面通过具体的演示来获得其使用方法。
- 1、查看当前集群中的资源
- oracle@bo2dbp:~> crs_stat -ls | grep srv
- ora....O4A.srv oracle oinstall rwxrwxr--
- ora....0g1.srv oracle oinstall rwxrwxr--
-
- oracle@bo2dbp:~> crs_stat -p | grep srv
- NAME=ora.GOBO4.GOBO4_SRV.GOBO4A.srv
- NAME=ora.ora10g.hr_ora10g.ora10g1.srv
- DESCRIPTION=ora.ora10g.hr_ora10g.ora10g1.srv
-
- oracle@bo2dbp:~> crs_getperm ora.ora10g.hr_ora10g.ora10g1.srv
- Name: ora.ora10g.hr_ora10g.ora10g1.srv
- owner:oracle:rwx,pgrp:oinstall:rwx,other::r--,
-
- 2、crs_getperm与crs_setperm的用法
-
- oracle@bo2dbp:~> crs_getperm -h
- Usage: crs_getperm resource_name [-u user|-g group] [-q]
-
- oracle@bo2dbp:~> crs_setperm -h
- Usage: crs_setperm resource_name -u aclstring [-q]
- crs_setperm resource_name -x aclstring [-q]
- crs_setperm resource_name -o user_name [-q]
- crs_setperm resource_name -g group_name [-q]
-
- -u Update the acl string
- -x Delete the acl string
- -o Change the owner of the resource
- -g Change the primary group of the resource
-
- aclstring is one of the following:
- user:<username>:rwx
- group:<groupname>:r-x
- other::r--
-
- 3、演示使用crs_setperm
- oracle@bo2dbp:~> su
- Password:
- bo2dbp:/users/oracle
- bo2dbp:/users/oracle
-
- bo2dbp:/users/oracle
- Name: ora.ora10g.hr_ora10g.ora10g1.srv
- owner:root:rwx,pgrp:root:rwx,other::r--,
-
- bo2dbp:/users/oracle
- bo2dbp:/users/oracle
- Name: ora.ora10g.hr_ora10g.ora10g1.srv
- owner:root:rwx,pgrp:root:r-x,other::r--,
-
- bo2dbp:/users/oracle
- bo2dbp:/users/oracle
- bo2dbp:/users/oracle
-
- bo2dbp:/users/oracle
- Name: ora.ora10g.hr_ora10g.ora10g1.srv
- owner:oracle:rwx,pgrp:oinstall:rwx,other::r--,
-
- bo2dbp:/users/oracle
- oracle@bo2dbp:~> crs_setperm ora.ora10g.hr_ora10g.ora10g1.srv -u owner:oracle:r-x
- CRS-0248: Acl operation failed
-
- oracle@bo2dbp:~> crs_setperm ora.ora10g.hr_ora10g.ora10g1.srv -u owner:oracle:rw-
- CRS-0248: Acl operation failed
-
- oracle@bo2dbp:~> crs_setperm ora.ora10g.hr_ora10g.ora10g1.srv -u owner:oracle:-wx
- CRS-0248: Acl operation failed
-
- oracle@bo2dbp:~> crs_setperm ora.ora10g.hr_ora10g.ora10g1.srv -u pgrp:oinstall:r-x
-
- oracle@bo2dbp:~> crs_getperm ora.ora10g.hr_ora10g.ora10g1.srv
- Name: ora.ora10g.hr_ora10g.ora10g1.srv
- owner:oracle:rwx,pgrp:oinstall:r-x,other::r--,
-
- oracle@bo2dbp:~> crs_setperm ora.ora10g.hr_ora10g.ora10g1.srv -u other::rwx
- oracle@bo2dbp:~> crs_getperm ora.ora10g.hr_ora10g.ora10g1.srv
- Name: ora.ora10g.hr_ora10g.ora10g1.srv
- owner:oracle:rwx,pgrp:oinstall:r-x,other::rwx,
-
- oracle@bo2dbp:~> crs_stat -ls |grep srv
- ora....O4A.srv oracle oinstall rwxrwxr--
- ora....0g1.srv oracle oinstall rwxr-xrwx
- 转:http://blog.csdn.net/leshami/article/details/8219242
使用crs_setperm修改RAC资源的所有者及权限
原文:http://www.cnblogs.com/andy6/p/5877462.html