修改GI文件的权限
参考文档:
How to check and fix file permissions on Grid Infrastructure environment (Doc ID 1931142.1)
-- 验证二进制文件的权限
[grid@node19c01 ~]$ cluvfy comp software -n node19c01 -verbose
Performing following verification checks ...
Software home: /u01/app/19.0.0/grid ...
Node Name Status Comment
------------ ------------------------ ------------------------
node19c01 passed 1256 files verified
Software home: /u01/app/19.0.0/grid ...PASSED
Verification of software was successful.
CVU operation performed: software
Date: Feb 11, 2024 9:29:29 AM
CVU version: 19.22.0.0.0 (122623x8664)
Clusterware version: 19.0.0.0.0
CVU home: /u01/app/19.0.0/grid
Grid home: /u01/app/19.0.0/grid
User: grid
Operating system: Linux3.10.0-693.el7.x86_64
[grid@node19c01 ~]$
-- 检查以下两个文件,两个文件在GI安装的时候产生
- crsconfig_dirs which has all directories listed in <GRID_HOME> and their permissions
- crsconfig_fileperms which has list of files and their permissions and locations in <GRID_HOME>.
[grid@node19c01 node19c01]$ ls -l
total 36
-rw-r--r-- 1 grid oinstall 14942 Feb 3 10:34 crsconfig_dirs
-rw-r--r-- 1 grid oinstall 18394 Feb 3 10:34 crsconfig_fileperms
[grid@node19c01 node19c01]$ pwd
/u01/app/19.0.0/grid/crs/utl/node19c01
[grid@node19c01 node19c01]$
-- 在crs没有启动的情况下,执行初始化权限
11.2
GI :
# cd <GRID_HOME>/crs/install/
# ./rootcrs.pl -init
Standalone GI :
# cd <GRID_HOME>/crs/install/
# ./roothas.pl -init
12c及以上
GI:
# cd <GRID_HOME>/crs/install/
# ./rootcrs.sh -init
Standalone GI :
# cd <GRID_HOME>/crs/install/
# ./roothas.sh -init
-- 附crsconfig_dirs和 crsconfig_fileperms的内容
[grid@node19c01 node19c01]$ more crsconfig_dirs
# Copyright (c) 2009, 2023, Oracle and/or its affiliates.
# The values in each line use the following format:
#
# OSLIST DIRNAME OWNER GROUP CLOSED-PERMS OPEN-PERMS
#
# Note:
# 1) OSLIST is a comma-separated list of platforms on which the directory
# needs to be created. 'all' indicates that the directory needs to be
# created on every platform. OSLIST MUST NOT contain whitespace.
# 2) Permissions need to be specified AS OCTAL NUMBERS. If permissions are
# not specified, default (umask) values will be used.
#
# TBD: OPEN-PERMS need to be added for each dir
all /u01/app/19.0.0/grid/cdata grid oinstall 0775
all /u01/app/19.0.0/grid/log grid oinstall 0775
all /u01/app/19.0.0/grid/log/node19c01 root oinstall 01755
all /u01/app/19.0.0/grid/log/node19c01/crsd root oinstall 0750
all /u01/app/19.0.0/grid/log/node19c01/ctssd root oinstall 0750
all /u01/app/19.0.0/grid/log/node19c01/evmd grid oinstall 0750
all /u01/app/19.0.0/grid/log/node19c01/cssd grid oinstall 0750
all /u01/app/19.0.0/grid/log/node19c01/mdnsd grid oinstall 0750
all /u01/app/19.0.0/grid/log/node19c01/gpnpd grid oinstall 0750
[grid@node19c01 node19c01]$ more crsconfig_fileperms
# Copyright (c) 2009, 2022, Oracle and/or its affiliates.
# The values in each line use the following format:
#
# OSLIST FILENAME OWNER GROUP PERMS
#
# Note:
# 1) OSLIST is a comma-separated list of platforms on which the file
# permissions need to be set. 'all' indicates that the directory needs
# to be created on every platform. OSLIST MUST NOT contain whitespace.
# 2) Permissions need to be specified AS OCTAL NUMBERS. If permissions
# are not specified, default (umask) values will be used.
# 3) The fields within each line of this file must be delimited by a single space
#
unix /u01/app/19.0.0/grid/bin/usrvip root oinstall 0755
unix /u01/app/19.0.0/grid/bin/appvipcfg root oinstall 0755
unix /u01/app/19.0.0/grid/bin/appvipcfg.pl root oinstall 0750
unix /u01/app/19.0.0/grid/bin/crsrename root oinstall 0755
unix /u01/app/19.0.0/grid/bin/crsrename.pl root oinstall 0750
unix /u01/app/19.0.0/grid/bin/cdpcfg root oinstall 0755
unix /u01/app/19.0.0/grid/bin/cdpcfg.pl root oinstall 0750
unix /u01/app/19.0.0/grid/crs/install/s_crsconfig_defs grid oinstall 0755
END