Edit hrm.conf

The hrm.conf file is used by both the Web server and the Queue Manager.

Copy the sample file

The sample configuration file $HRM_SAMPLES/hrm.conf.sample must be copied to /etc/hrm.conf and then edited as explained in the following sections.

sudo cp $HRM_SAMPLES/hrm.conf.sample /etc/hrm.conf

Edit the configuration file

This is the content of the sample configuration file:

#!/bin/bash
#
# HRM configuration file
#
# This file is part of the Huygens Remote Manager
# Copyright and license notice: see license.txt

# HRM install directory
HRM_HOME="/path/to/hrm/home"

# HRM image share
HRM_DATA="/path/to/hrm/data"

# Source and destination folder names
HRM_SOURCE="huygens_src"
HRM_DEST="huygens_dst"

# User to run the HRM daemon with rights to
# execute /bin/mkdir, /bin/chown, /bin/chmod and
# /bin/rm on HRM_DATA (see above) for user management.
SUSER="hrm"

# HRM log directory
HRM_LOG="/var/log/hrm"

# Interaction with OMERO (if switched on in hrm/config).
OMERO_PKG="/opt/OMERO/OMERO.server"
OMERO_HOSTNAME="full.qualified.name.of.omero.server"
OMERO_PORT="4064"

# Set a custom PHP CLI binary if necessary:
# PHP_CLI="/usr/local/php/bin/php"

Explanation

  • HRM_HOME points to $WWW_ROOT/hrm (for example: /var/www/html/hrm).
  • HRM_DATA points to the data folder that contains all user subfolders (for example: /data/hrm_data).
  • HRM_SOURCE and HRM_DEST are the source and destination subfolders inside the user directory (for example: src and dst). The source folder for an hypothetical user ‘john’ would then be /data/hrm_data/john/src.
  • SUSER is the Unix user that runs the Queue Manager (for example: hrm).
  • HRM_LOG is the log folder for the HRM (for example: /var/log/hrm)
  • (optional) OMERO_PKG, OMERO_HOSTNAME and OMERO_PORT: see OMERO connector for details.
  • (optional) PHP_CLI is the path tho the php CLI executable if it is not in the path or another one should be used (for example: /usr/local/php/bin/php).

Set up the HRM user and group

Create a Unix group hrm and user hrm on the web server machine.

$ sudo groupadd --system hrm
$ sudo useradd hrm --system --gid hrm

Create the log directory:

sudo mkdir ${HRM_LOG}

Make sure hrm owns (and has full read-write access) to HRM_DATA and HRM_LOG. This is done by setting the group ownership of HRM_DATA and HRM_LOG to hrm:

sudo chown -R hrm:hrm ${HRM_DATA}
sudo chmod -R u+s,g+ws ${HRM_DATA}
sudo chown -R hrm:hrm ${HRM_LOG}
sudo chmod -R u+s,g+ws ${HRM_LOG}

Add the Apache user (ubuntu www-data, fedora apache) to the hrm group:

# www-data in Ubuntu, apache in Fedora
sudo usermod www-data --append --groups hrm

Note

You might have to restart your server for the group changes to be activated.