How to start HMA as root

How to start HMA as root

book

Article ID: KB0072159

calendar_today

Updated On:

Products Versions
TIBCO Hawk 5.x 6.x 7.x

Description

As per hawk documentation, HMA internally gathers various system level information through different system artifacts such as, files, folders, scripts and so on. It requires root permission. Without sufficient permission, HMA process may not work properly or even crash.
To avoid these kind of issues, we strongly recommend running HMA root.

Issue/Introduction

How to start HMA as root

Environment

Linux and Unix

Resolution

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
  1. Change owner to root, add stick bit
    chown root tibhawkhma
    chown root starthma
    chmod u+s tibhawkhma
    chmod u+s starthma
  2. 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
    *******************************
  3. Run command ldconfig
For more details see article 000018120 and Hawk documentation.
 
3. Sudo  -> Recommended.
  1. Add your_user to sudo user
  2. 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.

Additional Information

Article 000018120 , Hawk documentation and HK-6896