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

Can't update Cumulus on Pi - Permissions issue with InstallCMX

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
ukchaser
Posts: 3
Joined: Wed 30 Nov 2016 8:10 pm
Weather Station: Davis Vantage Vue
Operating System: Raspbian

Can't update Cumulus on Pi - Permissions issue with InstallCMX

Post by ukchaser »

Hi all

I've been running an old version of cumulusmx for years with a raspberry pi but the sd card died a few months back. I've just set it up again with the pre-built Raspberry Pi Image (3.18.0 b3190) and noticed it needed updating (3.19). Fine, I used the InstallCMX.exe tool and it appeared to work, no errors, but when I checked the log I got this below. In filezilla I can see most of the files in the /otp/CumulusMX directory are owned by root and it seems the user cmx can't overwrite them. Do I have to pull the SD card out and use a linux viewer on windows to copy the files? Can I chmod the directory? Can I give cmx user some more rights? I've tried just unzipping the files too and that doesn't work!

Hopefully I'm just missing something silly :)
2022-07-11 20:29:28 CMX multiplatform installer version Version 1.0.2 - (c) Hans Rottier
2022-07-11 20:29:28 CommandLineArgs : starting
2022-07-11 20:29:28 Running on : Unix
2022-07-11 20:29:29 Error No authorisation reading Directory /lib
2022-07-11 20:29:29 Error No authorisation reading Directory /var
2022-07-11 20:29:30 Error No authorisation reading Directory /usr
2022-07-11 20:29:30 Error No authorisation reading Directory /root
2022-07-11 20:29:30 Error No authorisation reading Directory /tmp
2022-07-11 20:29:30 Error No authorisation reading Directory /lost+found
2022-07-11 20:29:30 Error No authorisation reading Directory /etc
2022-07-11 20:29:30 Error No authorisation reading Directory /run
2022-07-11 20:29:30 Updating ./CumulusMXDist3191.zip in /opt/CumulusMX/

2022-07-11 20:29:36 Extracting : CumulusMX/acknowledgements.txt => /opt/CumulusMX/acknowledgements.txt
2022-07-11 20:29:36 Extracting : CumulusMX/AirLinkFileHeader.txt => /opt/CumulusMX/AirLinkFileHeader.txt
2022-07-11 20:29:36 Error Failed Extracting : CumulusMX/AirLinkFileHeader.txt to /opt/CumulusMX/AirLinkFileHeader.txt
2022-07-11 20:29:36 Error Exception message : Access to the path '/opt/CumulusMX/AirLinkFileHeader.txt' is denied.
2022-07-11 20:29:36 Installation of CMX Failed.
2022-07-11 20:29:36 Please check your logfile, destination directory and/or user rights.
2022-07-11 20:29:36 Done
User avatar
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: Can't update Cumulus on Pi - Permissions issue with InstallCMX

Post by HansR »

If all files are owned (owner/group) by root you will have to install/update as root and also run as root (assuming your datafiles are also owned by root.

However, it is possible to chown/chgrp all files to your cmx user and update simply from the account cmx. In that case you must also run as the cmx owner. If you run as root, new data files will be owned by root. Mixed ownership is a source of problems.

Ownership is a choice but you must be consistent.
If you use systemd to start/stop you must set the user according to file ownership.
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
ukchaser
Posts: 3
Joined: Wed 30 Nov 2016 8:10 pm
Weather Station: Davis Vantage Vue
Operating System: Raspbian

Re: Can't update Cumulus on Pi - Permissions issue with InstallCMX

Post by ukchaser »

Thanks for your reply!

I had no option with the raspberry image to set ownership. When it first runs you log in with cmx and just change the password and I can't seem to find any details on the root account. I did try logging in as root as I figured this was the issue, but no luck. I assumed cmx may have been set with all the user rights necessary seeing as it was pre built for running cumulusmx.

So, I can assume the cmx user is pointless? Or do I need to run cumulusmx from a new folder that I set up with the cmx user? If that's the case then surely that's just the same as having a blank raspian install? Can I take ownership of the current root folders with the cmx user that's pre built in to the image?

Thanks again.
User avatar
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: Can't update Cumulus on Pi - Permissions issue with InstallCMX

Post by HansR »

In general: check out the sudo command!
ukchaser wrote: Mon 11 Jul 2022 9:43 pm I had no option with the raspberry image to set ownership. When it first runs you log in with cmx and just change the password and I can't seem to find any details on the root account.
OK. I don't know about the image, never used it maybe @mcrossley can say something about it.
ukchaser wrote: Mon 11 Jul 2022 9:43 pm I did try logging in as root as I figured this was the issue, but no luck.
You can't login as root, you just use the sudo command.
If you wish to do multiple commands as root do sudo su first (which gives you the root prompt) and when done do exit getting back to your original login.

If you use installCMX.exe under root (do: sudo installCMX.exe) it will probably install perfectly, maintaining the ownership for files which are already owned by cmx. Do check the ownership of the datafiles against the owner you run with though.
ukchaser wrote: Mon 11 Jul 2022 9:43 pm I assumed cmx may have been set with all the user rights necessary seeing as it was pre built for running cumulusmx.
I assume so yes, the wiki does not really say this explicitly but that seems logical. Again, I don't know, this seems to be a topic for @mcrossley. Again updating under root will do I think (NOTE that updating is different from installing under root because when installing you give all ownership of the newly created files to root).
ukchaser wrote: Mon 11 Jul 2022 9:43 pm So, I can assume the cmx user is pointless? Or do I need to run cumulusmx from a new folder that I set up with the cmx user? If that's the case then surely that's just the same as having a blank raspian install? Can I take ownership of the current root folders with the cmx user that's pre built in to the image?
I assume that is a bit too fast jumped to conclusion ;)
But again, Mark might have something to say about this.
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
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Can't update Cumulus on Pi - Permissions issue with InstallCMX

Post by mcrossley »

ukchaser wrote: Mon 11 Jul 2022 9:43 pm I had no option with the raspberry image to set ownership. When it first runs you log in with cmx and just change the password and I can't seem to find any details on the root account.
Just the default for Raspberry Pi OS - which is no password for root. You have to set one yourself using sudo if you want one. You cannot login as root by default, again you can alter that if you wish, though it is not recommended practice.

ukchaser wrote: Mon 11 Jul 2022 9:43 pm So, I can assume the cmx user is pointless? Or do I need to run cumulusmx from a new folder that I set up with the cmx user? If that's the case then surely that's just the same as having a blank raspian install? Can I take ownership of the current root folders with the cmx user that's pre built in to the image?
The cmx user is the only user account on the system that allows you to login. It is a non-privileged account so you have to use sudo to stop/start the CMX service.

The CMX service runs as root in the prebuilt image.
ukchaser
Posts: 3
Joined: Wed 30 Nov 2016 8:10 pm
Weather Station: Davis Vantage Vue
Operating System: Raspbian

Re: Can't update Cumulus on Pi - Permissions issue with InstallCMX

Post by ukchaser »

Many thanks for the help from both of you!

I've managed to update it using the tool now. I had to sudo su first, then sudo ./InstallCMX.exe to get it to work.

I think in one of the wiki files is said you had to use mono to update it it.

Now I can set it all up again knowing I can update the core files easily :lol:
User avatar
mcrossley
Posts: 14388
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Can't update Cumulus on Pi - Permissions issue with InstallCMX

Post by mcrossley »

If you put the installer in one of the folders in the default sudoers path (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin), then you should be able to just sudo it from the cmx user. (I think, reaching my Linux limits here!)
User avatar
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: Can't update Cumulus on Pi - Permissions issue with InstallCMX

Post by HansR »

ukchaser wrote: Tue 12 Jul 2022 9:21 am I've managed to update it using the tool now. I had to sudo su first, then sudo ./InstallCMX.exe to get it to work.
OK. The sudo su is redundant but if you do that you do not have to give the next sudo ;)
ukchaser wrote: Tue 12 Jul 2022 9:21 am I think in one of the wiki files is said you had to use mono to update it it.
Indeed, if mono has not been activated you have to activate mono.
ukchaser wrote: Tue 12 Jul 2022 9:21 am Now I can set it all up again knowing I can update the core files easily :lol:
Good :D
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
freddie
Posts: 2870
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 24.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Can't update Cumulus on Pi - Permissions issue with InstallCMX

Post by freddie »

mcrossley wrote: Tue 12 Jul 2022 9:39 am If you put the installer in one of the folders in the default sudoers path (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin), then you should be able to just sudo it from the cmx user. (I think, reaching my Linux limits here!)
You can just sudo it from the cmx user anyway. You can add the location of the installer to the user's path, but the only change that makes is that you don't have to give a path to the installer (which is what ./InstallCMX.exe does. If you've put the installer location in the path you can just issue "InstallCMX.exe").

As Hans said earlier the only reason to use "sudo su" is if you have a lot of root-level stuff you want to do, to save typing sudo every command. I think the Windows equivalent of "sudo su" is running a CMD window as Administrator.

You certainly don't have to sudo anything if you have already typed "sudo su" in your terminal - Hans stated this too.
Freddie
Image
Post Reply