This guide steps through the changes to settings and filesystem privileges required to enhance the security of NMIS9 Modules on Ubuntu.
Info |
---|
This guide runs top to bottom as a sequence. It is important that this sequence is followed in order to prevent issues on restart. Backups are highly recommended. |
Table of Contents |
---|
Preparation
...
With the new USER, GROUP and altered PID entries as per the following - post change. You can use this example as a guide for a concise review of each file if you wish.
Code Block | ||
---|---|---|
| ||
# simple systemd unit file for the Opmantek Webserver daemon
[Unit]
Description=Opmantek Webserver
After=network-online.target
After=mongod.service
Requires=mongod.service
Wants=mongod.service
Wants=network-online.target
[Install]
WantedBy=multi-user.target
[Service]
PermissionsStartOnly=true
ExecStartPre=/bin/sh -c "mkdir -p /var/run/omk/"
ExecStartPre=/bin/sh -c "chown omkadmin.omkadmin /var/run/omk/"
ExecStartPre=/bin/sh -c "chmod 3700 /var/run/omk/"
User=omkadmin
Group=omkadmin
Type=forking
Restart=no
EnvironmentFile=/etc/environment
PIDFile=/var/run/omk/opmantek.exe.pid
TimeoutSec=120s
KillMode=process
ExecStart=/usr/local/omk/script/opmantek.pl -f -p /var/run/omk/opmantek.exe.pid -r |
...