SUSI4 does not work on Linux without root privileges

My IoT client program needs to access SUSI for the Watchdog and other things.
I use SUSI4.0.14144 on Ubuntu Linux 16.
For security reasons, the program runs as an unprivileged user.
But calling SusiLibInitialize() returns SUSI_STATUS_ERROR!
It turns out that the program has to run as sudo or su.
But that is neither possible or wise, for security reasons.
So, what configurations are needed for an unprivileged program to use SUSI?



  • Hi Tmpsa,
    There is a way to use SUSI API as unprivileged user.
    In newest SUSI version, You can use this command to set your application capability first.
    Then you can run it at normal user account.

    # sudo setcap "cap_dac_override,cap_sys_rawio,cap_ipc_owner+ep" susidemo
    # ./susidemo

    If it not work, Maybe your SUSI version is a little old.
    I think you can contact with ADVANTECH AE, and they will happy to help you to devlop a new SUSI version. 
  • Thanks, that works. It's slightly better than
     sudo chown root:root susi-proc ; sudo chmod u=rws,g=,o=rwx susidemo4

    Question: will that list of needed capabilities ever change in future releases?

  • By the way, this important information should be documented in the Susi4 API User Manual.

Sign In or Register to comment.