【openGauss启动异常 [GAUSS53600] DETAIL: Permissions should be u=rwx (0700).

2023年 10月 25日 54.5k 0

报错信息

[GAUSS-53600]: Can not start the database, the cmd is source /home/omm/.bashrc; python3 '/opt/software/om/script/local/StartInstance.py' -U omm -R /opt/software/install/app -t 300 --security-mode=off, Error:
[FAILURE] openEuler:
[GAUSS-51607] : Failed to start instance. Error: Please check the gs_ctl log for failure details.
[2023-10-25 10:18:36.953][3594][][gs_ctl]: gs_ctl started,datadir is /opt/software/install/data/dn
[2023-10-25 10:18:37.155][3594][][gs_ctl]: waiting for server to start...
.0 LOG: [Alarm Module]can not read GAUSS_WARNING_TYPE env.

0 LOG: [Alarm Module]Host Name: openEuler

0 LOG: [Alarm Module]Host IP: openEuler. Copy hostname directly in case of taking 10s to use 'gethostbyname' when /etc/hosts does not contain

0 LOG: [Alarm Module]Cluster Name: dbCluster

0 LOG: [Alarm Module]Invalid data in AlarmItem file! Read alarm English name failed! line: 58

0 WARNING: failed to open feature control file, please check whether it exists: FileName=gaussdb.version, Errno=2, Errmessage=No such file or directory.
0 WARNING: failed to parse feature control file: gaussdb.version.
0 WARNING: Failed to load the product control file, so gaussdb cannot distinguish product version.
The core dump path is an invalid directory
2023-10-25 10:18:37.204 65387afd.1 [unknown] 140590081585088 [unknown] 0 dn_6001 55000 0 [BACKEND] FATAL: data directory "/opt/software/install/data/dn" has group or world access
2023-10-25 10:18:37.204 65387afd.1 [unknown] 140590081585088 [unknown] 0 dn_6001 55000 0 [BACKEND] DETAIL: Permissions should be u=rwx (0700).
[2023-10-25 10:18:38.157][3594][][gs_ctl]: waitpid 3597 failed, exitstatus is 256, ret is 2

[2023-10-25 10:18:38.157][3594][][gs_ctl]: stopped waiting
[2023-10-25 10:18:38.157][3594][][gs_ctl]: could not start server
Examine the log output..

因为数据目录权限与数据库系统要求不一致,导致的报错,数据库实例的数据目录权限应该是700,即仅有所属用户拥有可读可写可执行的权限(请确保所属用户与用户组是初始用户与用户组,即执行 gs_preinstall 时 -U 和 -G 参数指定的)

使用ls -l(缩写ll)命令可以查看目录、文件的详细信息包括权限信息、所属用户、用户组等信息

ll /opt/software/install/data/
ll /opt/software/install/data/dn/

解决办法

根据错误信息可以找到当前案例权限有问题的数据目录是:/opt/software/install/data/dn,如果所属用户与用户组不是初始用户使用以下命令进行更改,如果是可跳过

chown -R omm:dbgrp /opt/software/install

确保了所属用户与用户组问题后,将该目录及其子目录、文件的权限全部修改为700即可,执行以下命令实现权限更改

chmod -R 700 /opt/software/install/data/

更改完后在使用查询命令查询当前权限信息,如下所示就可以正常启动数据库了

ll /opt/software/install/data/
ll /opt/software/install/data/dn/

相关文章

Oracle如何使用授予和撤销权限的语法和示例
Awesome Project: 探索 MatrixOrigin 云原生分布式数据库
下载丨66页PDF,云和恩墨技术通讯(2024年7月刊)
社区版oceanbase安装
Oracle 导出CSV工具-sqluldr2
ETL数据集成丨快速将MySQL数据迁移至Doris数据库

发布评论