Welcome to the Cumulus Support forum.
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 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
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 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
barriers to not using root for MX?
Moderator: mcrossley
- GlueGuy2
- Posts: 49
- Joined: Fri 16 Jan 2015 5:39 pm
- Weather Station: Davis Vantage Pro2
- Operating System: Linux Buster
- Location: US - California
barriers to not using root for MX?
We just switched our VP2 weather station monitoring over to MX, and it seems to be working well on a raspberry pi (Model B Revision 2.0).
I created a user "cumulus" to store all the MX files and data (excepting mono). I have not tried running mono/MX as that user, but thought I would canvas the collective on what the barriers are toward running MX as something other than root.
I presume the issues are with mono, and not with MX, but I really have no clue at this point. I do run other types of web server stuff on linux systems, and all of those run the web GUI (apache) as a special user apache.apache. Those all work great, so my assumption is that the issue is not with the web server, but in fact with mono, or something beyond that.
I'm thinking about this, because what I want to do is to make the pi accessible over the internet, and I'm planning on opening up a port to go through our router/firewall.
I created a user "cumulus" to store all the MX files and data (excepting mono). I have not tried running mono/MX as that user, but thought I would canvas the collective on what the barriers are toward running MX as something other than root.
I presume the issues are with mono, and not with MX, but I really have no clue at this point. I do run other types of web server stuff on linux systems, and all of those run the web GUI (apache) as a special user apache.apache. Those all work great, so my assumption is that the issue is not with the web server, but in fact with mono, or something beyond that.
I'm thinking about this, because what I want to do is to make the pi accessible over the internet, and I'm planning on opening up a port to go through our router/firewall.
bp
-
- Posts: 239
- Joined: Sat 13 Jun 2015 5:57 pm
- Weather Station: FineOffset WS3080
- Operating System: Debian Buster - Raspbian - Raspb
- Location: Germany - nearby Kassel
Re: barriers to not using root for MX?
Open your firewall to access the Raspberry Pi on Port 8998 ?GlueGuy2 wrote: I'm thinking about this, because what I want to do is to make the pi accessible over the internet, and I'm planning on opening up a port to go through our router/firewall.
alternatively you can install a apache Webserver and copy the files locally instead of using the build in FTP.
In this case, you are allowing access to the apache directory and not to the Cumulus Webinterface which is only for the Admin.
- steve
- Cumulus Author
- Posts: 26701
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: barriers to not using root for MX?
I think the issue is with the HttpListener which MX uses for the web interface - this is the issue on Windows, and it can be run in non-admin mode by allowing access to the URL that it listens on. From what I read, on Linux it should only be an issue when trying to listen on port 80, and MX doesn't do that. Have you tried running it as non-root (making sure that all of the files and directories have the necessary permissions for your user)?
Note that if you allow access to the MX user interface over the internet, you will also be allowing access to the configuration interface.
Note that if you allow access to the MX user interface over the internet, you will also be allowing access to the configuration interface.
Steve
-
- Posts: 23
- Joined: Tue 12 May 2015 6:00 am
- Weather Station: WS-2095
- Operating System: Vista (Debian Linux)
- Location: Surrey, BC, Canada
Re: barriers to not using root for MX?
I just tried running CumulusMX.exe as a 'regular' user and it seems to run but says it can't find my weather station.
gord@server:~/Cumulus$ mono CumulusMX.exe -lang en-CA
Current culture: English (Canada)
Serial: CF1E8C14E54505F60AA10CEB8D5D8AB3
Cumulus MX v.3.0.0 build 3031
This is pre-release beta software
Today.ini = data/today.ini
Last update=2015-10-11T12:10:00
Fine Offset station not found
Cumulus running at: http://*:8998/
(Replace * with any IP address on this machine, or localhost)
Starting web socket server on port 8002
2015-10-11 1:38:28 PM
Type Ctrl-C to terminate
I'm not at all sure how it communicates with the weather station (that's connected via USB) perhaps there is something I could do to allow this??
gord@server:~/Cumulus$ mono CumulusMX.exe -lang en-CA
Current culture: English (Canada)
Serial: CF1E8C14E54505F60AA10CEB8D5D8AB3
Cumulus MX v.3.0.0 build 3031
This is pre-release beta software
Today.ini = data/today.ini
Last update=2015-10-11T12:10:00
Fine Offset station not found
Cumulus running at: http://*:8998/
(Replace * with any IP address on this machine, or localhost)
Starting web socket server on port 8002
2015-10-11 1:38:28 PM
Type Ctrl-C to terminate
I'm not at all sure how it communicates with the weather station (that's connected via USB) perhaps there is something I could do to allow this??
- steve
- Cumulus Author
- Posts: 26701
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: barriers to not using root for MX?
You need to change the permissions on the device so that it can be accessed from non-root. Create a file called 99-hid.rules and put it into /etc/udev/rules.d/
The file should contain the following line:
KERNEL=="hidraw*", ATTRS{busnum}=="1", ATTRS{idVendor}=="1941", ATTRS{idProduct}=="8021", MODE="0666"
(The vendor and product IDs shown are correct for Fine Offset stations only).
Then unplug your station, plug it in again, and start MX.
The file should contain the following line:
KERNEL=="hidraw*", ATTRS{busnum}=="1", ATTRS{idVendor}=="1941", ATTRS{idProduct}=="8021", MODE="0666"
(The vendor and product IDs shown are correct for Fine Offset stations only).
Then unplug your station, plug it in again, and start MX.
Steve
-
- Posts: 23
- Joined: Tue 12 May 2015 6:00 am
- Weather Station: WS-2095
- Operating System: Vista (Debian Linux)
- Location: Surrey, BC, Canada
Re: barriers to not using root for MX?
wow Steve, you opened a whole new area for me! I never knew much about udev and now I know just enough to be dangerous. Well not too dangerous because I still don't understand much.
One thing I found when researching this udev stuff was the following:
Files in /etc/udev/rules.d/ are parsed in lexical order, and in some circumstances, the order in which rules are parsed is important. In general, you want your own rules to be parsed before the defaults, so I suggest you create a file at /etc/udev/rules.d/10-local.rules and write all your rules into this file. from (http://www.reactivated.net/writing_udev_rules.html)
I'm not at all sure the implications of timing of when the rules are run or, in our case, if it really makes any difference.
Do you have an opinion?
One thing I found when researching this udev stuff was the following:
Files in /etc/udev/rules.d/ are parsed in lexical order, and in some circumstances, the order in which rules are parsed is important. In general, you want your own rules to be parsed before the defaults, so I suggest you create a file at /etc/udev/rules.d/10-local.rules and write all your rules into this file. from (http://www.reactivated.net/writing_udev_rules.html)
I'm not at all sure the implications of timing of when the rules are run or, in our case, if it really makes any difference.
Do you have an opinion?
- steve
- Cumulus Author
- Posts: 26701
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: barriers to not using root for MX?
Everywhere that I have seen instructions for changing the permissions on HID devices, they have used 99- as the start of the rules file.
Steve
- mcrossley
- Posts: 12756
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: barriers to not using root for MX?
Makes sense as you want your rules to over-ride the defaults, so they need to be processed last.
-
- Posts: 23
- Joined: Tue 12 May 2015 6:00 am
- Weather Station: WS-2095
- Operating System: Vista (Debian Linux)
- Location: Surrey, BC, Canada
Re: barriers to not using root for MX?
I agree.
I've added what you suggested and now I can run CumulusMX as a non-root user.
Thanks!
I've added what you suggested and now I can run CumulusMX as a non-root user.
Thanks!
-
- Posts: 481
- Joined: Tue 12 Apr 2011 10:23 pm
- Weather Station: Watson W-8186
- Operating System: Raspbian Bookworm & Debian 12
- Location: Leicester
- Contact:
Re: barriers to not using root for MX?
I have done what Steve suggested it doesn't work for me. I have rebooted the vmware host and removed the USB and re added it back but still only works with root by doing su within user cumulus.
Desford Weather (at parents)
https://desford-weather.co.uk
Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
https://desford-weather.co.uk
Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
- steve
- Cumulus Author
- Posts: 26701
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: barriers to not using root for MX?
More details, please - "doesn't work" is not helpful. What happens when you run it non-root? Are all of your file and directory permissions set correctly for the non-root user that you're using?
Steve
-
- Posts: 481
- Joined: Tue 12 Apr 2011 10:23 pm
- Weather Station: Watson W-8186
- Operating System: Raspbian Bookworm & Debian 12
- Location: Leicester
- Contact:
Re: barriers to not using root for MX?
Sorry Steve,
I was on about the script called ./cumulusmx.sh only works with root or sudo.
Yes cumulus does work with mono CumulusMX.exe however using a ftp server on my machine. the ftp only accepts root access trying to find a way of using cumulus as a user to only use the ftp server on the machine cumulus is installed on.
I was on about the script called ./cumulusmx.sh only works with root or sudo.
Yes cumulus does work with mono CumulusMX.exe however using a ftp server on my machine. the ftp only accepts root access trying to find a way of using cumulus as a user to only use the ftp server on the machine cumulus is installed on.
Desford Weather (at parents)
https://desford-weather.co.uk
Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
https://desford-weather.co.uk
Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
- mcrossley
- Posts: 12756
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: barriers to not using root for MX?
Why would you FTP to same machine, a simple copy would be more reliable and efficient?
-
- Posts: 481
- Joined: Tue 12 Apr 2011 10:23 pm
- Weather Station: Watson W-8186
- Operating System: Raspbian Bookworm & Debian 12
- Location: Leicester
- Contact:
Re: barriers to not using root for MX?
If i dont use FTP how can i upload updated data which updates every minute to the /var/www without using a FTP client?
Desford Weather (at parents)
https://desford-weather.co.uk
Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
https://desford-weather.co.uk
Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
-
- Posts: 3246
- Joined: Sat 13 Aug 2011 9:33 am
- Weather Station: Ecowitt HP2551
- Operating System: Windows 10 64bit
- Location: Burnham-on-Sea
- Contact:
Re: barriers to not using root for MX?
If it on the same machine just use Cumulus to copy the files to the /var/www directory.