In GBase 8a V8, installation, upgrades, and service management all required root privileges. Starting with V95, all database services run under a non‑root dbauser (typically gbase). However, certain environment setup operations, such as running SetSysEnv.py, still need root‑level permissions to adjust system limits. This does not mean you must log in as root or know the root password — you can use sudo instead.
Running SetSysEnv.py with sudo
The following example shows the gbase user successfully executing SetSysEnv.py via sudo:
[gbase@gbase_rh7_015 ~]$ sudo ./SetSysEnv.py --dbaUser=gbase
Checking the log confirms the script ran with root privileges and applied the necessary system settings:
[gbase@gbase_rh7_015 ~]$ tail /tmp/SetSysEnv.log
2023-04-24 09:37:31,733-root-INFO Set system max memory size to end.
2023-04-24 09:37:31,770-root-INFO Set system virtual memory...
2023-04-24 09:37:31,810-root-INFO exec cmd:su - gbase -c "ulimit -v",and return value:unlimited
2023-04-24 09:37:31,811-root-INFO Modify system env end.
As long as the gbase user has sudo privileges, SetSysEnv.py can complete its tasks without ever needing the root password. This is the recommended approach in environments where direct root access is restricted.
In a gbase database V95 deployment, remember that daily operations run as gbase, but one‑time environment setup still requires a privilege escalation step — and sudo is the safe and standard way to do it.
Top comments (0)