Here are the ways to run HMA as root:
1. Switch to root user, run starthma script. -> Not recommended.
Most of customer don't want to use super user in their environment. Also, if HMA were owned by root user, non-root user cannot stop it.
2. Setuid -> Recommended.
Just follow the steps below:
change directory to <tibco_home>/hawk/<version>/bin
- Change owner to root, add stick bit
chown root tibhawkhma
chown root starthma
chmod u+s tibhawkhma
chmod u+s starthma - Add the following entries to /etc/ld.so.conf
*******************************
/<TIBCO_HOME>/tibrv/<VERSION>/lib
/<TIBCO_HOME>/hawk/<VERSION>/lib
/<TIBCO_HOME>/hawk/<VERSION>/ami_api/lib
/<TIBCO_HOME>/as/<VERSION>/lib
******************************* - Run command ldconfig
For more details see article
000018120 and Hawk documentation.
3. Sudo -> Recommended.
- Add your_user to sudo user
- Start hma using command: sudo ./starthma
#2 and #3 allow non-root user start/stop HMA as root. There is no difference. The only requirement of HMA is that it should have the root privileges.