The rpm based postinstall.sh script should run ./upgrade as the user the DS is running as.
RPM's must be installed as root, but if the admin has changed the file ownership for security purposes, the RPM upgrade changes the file ownership back to root which will make systemd actions fail.
The upgrade always succeeds
>>>> OpenDJ data was successfully upgraded from version
However, the systemd service fails to start...permissions problem obtaining an exclusive lock...
[root@ds01 ~]# systemctl start opendj
Job for opendj.service failed because the control process exited with error code. See "systemctl status opendj.service" and "journalctl -xe" for details.
[root@ds01 ~]# systemctl status opendj.service
opendj.service - ForgeRock DS/OpenDJ 6.5.3-1
Loaded: loaded (/usr/lib/systemd/system/opendj.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2021-02-09 16:28:48 UTC; 16s ago
Process: 30537 ExecStart=/opt/opendj/bin/start-ds --quiet (code=exited, status=98)
Main PID: 6321 (code=exited, status=143)
Feb 09 16:28:48 ds01.local start-ds: The Directory Server could not acquire an exclusive lock on file /opt/opendj...
Feb 09 16:28:48 ds01.local systemd: opendj.service: control process exited, code=exited status=98
Feb 09 16:28:48 ds01.local systemd: Failed to start ForgeRock DS/OpenDJ 6.5.3-1.
Feb 09 16:28:48 ds01.local systemd: Unit opendj.service entered failed state.
Feb 09 16:28:48 ds01.local systemd: opendj.service failed.
Hint: Some lines were ellipsized, use -l to show in full.