Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.13.8 (build 3154) - 09 November 2021

Legacy Cumulus 1 release v1.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 interested in supporting Cumulus then maybe you would like to contribute to the maintenance of the Wiki? This need not take hours of your time - just a half hour here and there can make a big difference, particularly if many people are doing this. Any contributions are very welcome, whether they involve new content or editing of existing content. It will be very helpful to current and future users of Cumulus software if the Wiki is kept well-maintained and current. If you are interested then please contact forum user saratogaWX and ask for a Wiki account.

Linux/rPi Sudo Usage.

Please use this Forum to make suggestions for the future updates additions and general maintenance of the Wiki. Since I am sure most of these will be valid suggestions, so as they are completed in the Wiki the Topic will be deleted from this Forum, and this will act as reminder to anyone updating the Wiki of the jobs still to be done.
Post Reply
Phil23
Posts: 800
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Linux/rPi Sudo Usage.

Post by Phil23 »

Looking at this section but want to clarify the facts.

Code: Select all

All the Cumulus packages, should be put into a sub-folder called “CumulusMX” (note where capital letters must be used).
You can create that folder as you unzip a MX release, or you can type sudo mkdir EXISTING PATH/CumulusMX first (note that EXISTING PATH is explained above and always starts with a slash “/”).
It is best to change permissions for the "CumulusMX" sub-folder, chmod ugo+rwx CumulusMX will give full rights to the folder, so that "sudo" is not needed to run an executable there, and you can read/update any file in the folder regardless of which user you have logged in.
If the directory is created with Sudo, it's owner & group would then be root:root, so even if chmod is performed, user pi would not have access to that directory.

I am finding similar issues when running under Sudo Vs Pi.
I can run under pi, but if I then run a session under Sudo, that session will create new folders & on rollovers new files that are owned by root.
Then going back to running as pi will have issues unless ownership is changed.

Don't want to change Wiki wording if I am not correct.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:

freddie
Posts: 1547
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 20.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Linux/rPi Sudo Usage.

Post by freddie »

Phil23 wrote:
Thu 22 Jul 2021 6:33 am
Looking at this section but want to clarify the facts.

Code: Select all

All the Cumulus packages, should be put into a sub-folder called “CumulusMX” (note where capital letters must be used).
You can create that folder as you unzip a MX release, or you can type sudo mkdir EXISTING PATH/CumulusMX first (note that EXISTING PATH is explained above and always starts with a slash “/”).
It is best to change permissions for the "CumulusMX" sub-folder, chmod ugo+rwx CumulusMX will give full rights to the folder, so that "sudo" is not needed to run an executable there, and you can read/update any file in the folder regardless of which user you have logged in.
If the directory is created with Sudo, it's owner & group would then be root:root, so even if chmod is performed, user pi would not have access to that directory.
That's not true. If you do chmod ugo+rwx you are giving every user full access. You may not be able to edit files in that directory if they are not owned by you, but you will be able to delete them. IMHO using the ugo+rwx is bad practice. Better to use chown to assign ownership to the pi user.
Phil23 wrote:
Thu 22 Jul 2021 6:33 am
I am finding similar issues when running under Sudo Vs Pi.
I can run under pi, but if I then run a session under Sudo, that session will create new folders & on rollovers new files that are owned by root.
Then going back to running as pi will have issues unless ownership is changed.
It's best to use a less privileged user. It is definitely not a good idea to run in one session as root and then at a future time as pi. I don't understand why you would want to do that, as it will lead to permissions problems as you have found.
Freddie
Image

Phil23
Posts: 800
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: Linux/rPi Sudo Usage.

Post by Phil23 »

Thanks for the clarification.

And no I don't intend to run sessions as root & then pi, but from the outlines in the Wiki it was not clear that by default, when running as a service MX ran as root.

Other information stated how to run under a normal user and that was where I got tripped up.
Followed the outline & set permissions & ran as pi in a session, then tried as a service, which worked fine, but tripped me up when I went back & tried to run in a console session again.


Phil
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:

Phil23
Posts: 800
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: Linux/rPi Sudo Usage.

Post by Phil23 »

Other thing, can someone look at what I've got wrong here, the blank line in the left column on the table.

My intention was to add the blank lines for better readability.
(I do see an unexpected </tr> in the source).
Screenshot 2021-07-23 071632.jpg
You do not have the required permissions to view the files attached to this post.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:

sfws
Posts: 1021
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Combination Mix of FO stations
Operating System: R Pi OS

Re: Linux/rPi Sudo Usage.

Post by sfws »

Phil23 wrote:
Thu 22 Jul 2021 9:21 pm
My intention was to add the blank lines for better readability.
Thank you for those good intentions. As Freddie's message (pink area) says, it is helpful when other people contribute to the Wiki, especially if they make new pages, but improving existing content is also great.

In Wiki code formatting, "<code> </code>" is not intended to have formatting (even codes like <br>) within it. You would use <pre> </pre> instead to get content between those codes formatted as it is typed in including any line breaks.

Add the Mono repository for a Raspberry Pi does look much better thanks to your idea, I used CSS styling for the spacing within Wiki code syntax.
By the way, you increased the table width; in this case I have kept that. I most often view the Wiki, and do small edits, using my mobile. Contributors should be aware that the wide tables that may look better in a landscape view on a wide screen using computer, can make the font tiny, and possibly unreadable, when viewed on a mobile device in portrait view.

Phil23
Posts: 800
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: Linux/rPi Sudo Usage.

Post by Phil23 »

I do notice that the border on the table is now removed & also the formatting of what follows below is changed.
Was that by intent.

If it was to stay as a table maybe a 2 x 5 row table would provide clear separation of each line required & pack it up within a bordered box.

Edit:- Added another table in above your edits.
Please delete if it's an inappropriate change.

Did consider also adding the other lines required & listing their purpose above.

Phil.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:

Phil23
Posts: 800
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: Linux/rPi Sudo Usage.

Post by Phil23 »

Noticed also BEFORE my last edit that the formatting of all sections after USB HID have changed to a different font.

Could that be related to the CSS styling changes?
Example below.
You do not have the required permissions to view the files attached to this post.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:

Phil23
Posts: 800
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: Linux/rPi Sudo Usage.

Post by Phil23 »

And for some reason I see this in the preview but it must be caching when saved.
(Resolved. Missed the Captcha).
You do not have the required permissions to view the files attached to this post.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:

Phil23
Posts: 800
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: Linux/rPi Sudo Usage.

Post by Phil23 »

Found this:-

=== USB HID ===

There is one more prerequisite package for MX with some weather station types.

The cross-platform [https://www.nuget.org/packages/HidSharp/ Universal Serial Bus (USB) Human Interface Device (HID) library] used by MX to connect to weather stations that appear as a HID connecting via USB (like Fine Offset and USB connected Oregon Scientific models) calls a package file called ''libudev.so.1'', so you may need to [[#install|search]] your Linux computer for this file, and [[#install]] it if it is missing. Alternatively, you might just need a symbolic link where MX looks to where the file is.

To check your USB devices, type <code>sudo lsusb -t</code).

To check HID, download this [download/file.php?id=11414 USB HID test package] and run it.

Replaced ) with >.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:

Post Reply