Has anyone here got CMX running as a systemd service in Linux but not running as root?
My reasoning is that I need the CMX data files to be user files so other programs which run can access the files, simply altering the permissions on the data files is no good as I need this whole system to restart on a power failure or continue over month change etc (new data file(s) ) with no user intervention. Running these other programs as root is not acceptable.
Stuart
Welcome to the Cumulus Support forum.
Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080
Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)
Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki
If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080
Running CMX as a service but not as root?
Moderator: mcrossley
-
broadstairs
- Posts: 1185
- Joined: Thu 14 Aug 2008 7:17 am
- Weather Station: Ecowitt GW2000/GW3000
- Operating System: Linux openSUSE LEAP
- Location: Broadstairs, Kent, UK
- Contact:
Running CMX as a service but not as root?
Currently running CMX V4.4.2 4085 on Linux openSUSE Leap
- HansR
- Posts: 6926
- Joined: Sat 20 Oct 2012 6:53 am
- Weather Station: GW1100 (WS80/WH40)
- Operating System: Raspberry OS/Bookworm
- Location: Wagenborgen (NL)
- Contact:
Re: Running CMX as a service but not as root?
Hi,
I run CMX as service under user pi with the following systemd script:
I changed user/group for all files in the CMX tree to: pi/pi and everything works fine.
The side effect is that it is easy to update through e.g. WinSCP when that tool logs in as pi. No more use as root which is disadvised always. I only use root through sudo, rarely through sudo su.
And of course you can use any user you wish and install CMX in any directory you wish.
Safety first.
I run CMX as service under user pi with the following systemd script:
Code: Select all
[Unit]
Description=CumulusMX service
Documentation=https://cumuluswiki.org/a/Main_Page
Wants=network-online.target
After=network-online.target
Wants=time-sync.target
After=time-sync.target
[Service]
User=pi
Group=pi
ExecStart=/usr/bin/mono-service -d:/home/CumulusMX CumulusMX.exe -service
Type=forking
ExecStopPost=/bin/rm -f /tmp/CumulusMX.exe.lock
[Install]
WantedBy=multi-user.target
The side effect is that it is easy to update through e.g. WinSCP when that tool logs in as pi. No more use as root which is disadvised always. I only use root through sudo, rarely through sudo su.
And of course you can use any user you wish and install CMX in any directory you wish.
Safety first.
Hans
https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
-
broadstairs
- Posts: 1185
- Joined: Thu 14 Aug 2008 7:17 am
- Weather Station: Ecowitt GW2000/GW3000
- Operating System: Linux openSUSE LEAP
- Location: Broadstairs, Kent, UK
- Contact:
Re: Running CMX as a service but not as root?
Thanks for that. I was intending to user my user group as stuart/user for example as that is the user which runs the other apps. Now the other apps only need read access so if they get that I should be OK. I'll try using stuart/user and see what happens as I don't want the CMX files under another user/group if I can help it.
Stuart
Stuart
Currently running CMX V4.4.2 4085 on Linux openSUSE Leap
-
broadstairs
- Posts: 1185
- Joined: Thu 14 Aug 2008 7:17 am
- Weather Station: Ecowitt GW2000/GW3000
- Operating System: Linux openSUSE LEAP
- Location: Broadstairs, Kent, UK
- Contact:
Re: Running CMX as a service but not as root?
Just to confirm now I have CMX running as a service using my user and group. All working fine.
Stuart
Stuart
Currently running CMX V4.4.2 4085 on Linux openSUSE Leap