You are not logged in.
Hello I am trying to run flood as a specific user, rather than the default "flood" user.
I simply just changed the user in the systemd unit file:
[Unit]
Description=Flood rTorrent Web UI
After=network.target
[Service]
User=roberth
EnvironmentFile=/etc/conf.d/flood
ExecStart=/usr/bin/node --use_strict /usr/lib/flood/index.js --rundir /var/lib/flood $FLOOD_ARGS
[Install]
WantedBy=multi-user.target
Dec 18 12:23:20 archlinux systemd[1]: Started Flood rTorrent Web UI.
Dec 18 12:23:20 archlinux node[33656]: Failed to access runtime directory
Dec 18 12:23:20 archlinux systemd[1]: flood.service: Main process exited, code=exited, status=1/FAILURE
Dec 18 12:23:20 archlinux systemd[1]: flood.service: Failed with result 'exit-code'
While running the program through the shell as the user works as expected:
[roberth@archlinux ~]$ flood --host 0.0.0.0 --port 3000
Flood server 4.7.0 starting on http://0.0.0.0:3000
GET /overview 200 4.605 ms - 992
GET /static/css/main.2972bcb1ba7f012153ce.css 200 4.410 ms - -
GET /static/js/main.516d7e3d.js 200 5.404 ms - -
GET /static/css/26.db36dbf740cf15b386e3.css 200 1.992 ms - -
GET /static/js/128.e8f0d314.chunk.js 200 2.981 ms - -
GET /static/js/26.85fd7a9a.chunk.js 200 2.265 ms - -
GET /icon_maskable_180x180.png - - ms - -
GET /favicon.ico - - ms - -
GET /static/js/300.448a4645.chunk.js 200 1.380 ms - -
GET /static/js/flag0.e9c4137d.chunk.js 200 1.986 ms - -
GET /static/js/151.c7a442f2.chunk.js 200 2.925 ms - -
GET /static/media/Roboto-regular.11bce66a.woff2 200 0.929 ms - 10292
GET /static/media/Roboto-italic.766b7c5c.woff2 200 1.050 ms - 11500
GET /static/media/Roboto-500.c7e17507.woff2 200 1.034 ms - 10248
GET /static/media/Roboto-700.2b8c7cb1.woff2 200 0.633 ms - 10276
GET /api/activity-stream 401 6.059 ms - -
GET /api/auth/verify?1671363195860 401 7.679 ms - 56
GET /api/auth/verify?1671363195896 401 1.279 ms - 56
POST /api/auth/authenticate 200 138.978 ms - 48
GET /api/settings 200 3.492 ms - 659
GET /api/client/settings 200 8.197 ms - 602
GET /api/activity-stream 200 1.514 ms - -
Any help would be appreciated.
Use the Source, Luke!
Offline
Dec 18 12:23:20 archlinux node[33656]: Failed to access runtime directory
You also run different commands, likely with different environment (EnvironmentFile), in systemd and in your command line.
Sometimes I seem a bit harsh — don’t get offended too easily!
Offline
The enviroment file has the same parameters. No idea why it's launched the way it is in the unit file.
Use the Source, Luke!
Offline