CGI scripts

  • Creator
  • #50019
    David Barr

    I was just trying to call hcienginerun from a CGI script.  The problem is that the web server runs under a special user-id (www).  I tried writing a setuid wrapper program that would call hcienginerun, but hcienginerun is a Perl script, and it is smart enough to know that it is being called setuid, and it runs with a bunch of security restrictions that prevent it from working.  For example, the library search path reverts to the one that is compiled into Perl, and it can’t find even the default Perl libraries.

    I could try running the web server as Hci, but that’s kind of insecure.  I could try using the suexec module to get it to run as HCI.

    Does anyone have any examples of CGI scripts to start and stop Cloverleaf threads and processes?

Viewing 0 reply threads
  • Author
    • #64541
      Kevan Riley

      Threads are easier that processes (from a file owner/user perspective.  Thread start/stops talks to the process over a socket, so the web server user only has to have permissions to run the hcicmd script.  Processes are harder.  I have not yet figured out how to manage processes as another user with still having the process started and owned by hci.  I am probably going to have to resort to sudo.

      Kevan Riley

Viewing 0 reply threads
  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
Topic Tags