Page 3 of 4
Re: Error System uptime
Posted: Fri 01 Sep 2023 6:29 am
by broadstairs
OK so permissions on files uploaded are all 0644 and the upload.php is the same date as your copy. The upload.php exists in the CumulusMX directory on the server and CMX is running fine and uploading as it should and my own website runs fine based on Saratoga templates. The only upload fails are when I try to run cumulusutils as per the log files.
Stuart
Re: Error System uptime
Posted: Fri 01 Sep 2023 6:58 am
by HansR
stalemate afaics atm
Re: Error System uptime
Posted: Fri 01 Sep 2023 7:02 am
by freddie
Directory permissions where the cumuluscharts.txt file is being created? Does the user creating the files have write permission on the directory?
Re: Error System uptime
Posted: Fri 01 Sep 2023 8:08 am
by HansR
freddie wrote: ↑Fri 01 Sep 2023 7:02 am
Directory permissions where the cumuluscharts.txt file is being created? Does the user creating the files have write permission on the directory?
CUtils MUST run as the same user as CMX so I assume that is done. In general I asked about the same rights as CMX in this
post. Not explicitly responded to but in general Stuart says CMX does it OK which leads me to assume he runs CUtils as the same user as CMX (though not as daemon but from the commandline). So when CMX uploads OK, I see no reason why CUtils should not.
Re: Error System uptime
Posted: Fri 01 Sep 2023 8:24 am
by broadstairs
CMX runs as a service but runs under the same user not as root. The main CMX directory is owned by that user and permissions are 755. Logged in as that user I can create and delete files in that directory and it's the same user when I run cumulusutils having entered the main CumulusMX directory and run 'mono utils/bin/cumulusutils.exe' so there should be no permissions problems. The utils subdirectory is owned by the same user and group as the main CMX directory and has the same permissions 755. The cumuluscharts.txt is created in the local utils directory and is owned by the same user.
To my mind the main issue is that with the upload.php limitpath variable where it has to be false to upload anything, if true most if not all uploads fail.
As a test I will stop the service and run CMX from the command line and the try cumulusutils. I'll let you know what happens.
Stuart
Re: Error System uptime
Posted: Fri 01 Sep 2023 9:33 am
by HansR
broadstairs wrote: ↑Fri 01 Sep 2023 8:24 am
The utils subdirectory is owned by the same user and group as the main CMX directory and has the same permissions 755. The cumuluscharts.txt is created in the local utils directory and is owned by the same user.
To my mind the main issue is that with the upload.php limitpath variable where it has to be false to upload anything, if true most if not all uploads fail.
The local files and directories are not that interesting, it is the upload where things go wrong.
And afaik the
$LimitPath variable should have no influence (though it has!) because all files on the server are stored in the directory tree of CumulusMX and below.
I think the issue is somewhere in the upload/PHP/server interaction.
Re: Error System uptime
Posted: Fri 01 Sep 2023 9:41 am
by broadstairs
I have done my test and now have it working error free but still only with CMX run manually not as a service. The forecast error has gone as I removed that section, and I manually uploaded the cumuluscharts.js file and now it updates OK, it was not there so replace may have been the cause as I have no idea how upload.php handles a file to replace which does not exist maybe ask Mark although I will take a look at the code later.
I'll go back to a service for CMX and test again later.
Stuart
Re: Error System uptime
Posted: Fri 01 Sep 2023 11:08 am
by HansR
broadstairs wrote: ↑Fri 01 Sep 2023 9:41 am
I have done my test and now have it working error free but still only with CMX run manually not as a service. The forecast error has gone as I removed that section, and I manually uploaded the cumuluscharts.js file and now it updates OK, it was not there so replace may have been the cause as I have no idea how upload.php handles a file to replace which does not exist maybe ask Mark although I will take a look at the code later.
I'll go back to a service for CMX and test again later.
OK.
NOTE:
- CUtils does not have or use cumuluscharts.js but generates a cumuluscharts.txt. That is truly different.
- However, CUtils has a cumulusutils.js runtime system which will be present in the lib directory.
- All libraries which have a similar counterpart in CMX (e.g. gauges.js) exist in the CUtils environment on the server with a CU prefix (e.g. CUgauges.js). Therefore no interference can taken place.
- Those CU-prefixed libraries may not be assumed to be the same as their CMX counterparts !!
Re: Error System uptime
Posted: Fri 01 Sep 2023 11:13 am
by HansR
Hi Stuart, If I look at the site and press F12 I note that the libraries have not been copied to the server lib directory (it cannot find them).
That indicates an incorrect install (those files must be in the local utils directory to be copied to the server lib directory).
If you keep having that issue and need help, please post the logfile again.
Re: Error System uptime
Posted: Fri 01 Sep 2023 11:54 am
by mcrossley
Is that destination path correct...
Code: Select all
Cannot create the target file https://www.stella-maris.org.uk/CumulusMX/cumuluscharts.txt
I would have thought it should be a file system path rather than a URL?
Re: Error System uptime
Posted: Fri 01 Sep 2023 11:58 am
by HansR
mcrossley wrote: ↑Fri 01 Sep 2023 11:54 am
Is that destination path correct...
Code: Select all
Cannot create the target file https://www.stella-maris.org.uk/CumulusMX/cumuluscharts.txt
I would have thought it should be a file system path rather than a URL?
It works for all others who use the PHP upload system, no signal of being an issue.
It does more seem to be as if CMX keeps that directory locked.
Re: Error System uptime
Posted: Fri 01 Sep 2023 1:40 pm
by freddie
HansR wrote: ↑Fri 01 Sep 2023 8:08 am
freddie wrote: ↑Fri 01 Sep 2023 7:02 am
Directory permissions where the cumuluscharts.txt file is being created? Does the user creating the files have write permission on the directory?
CUtils MUST run as the same user as CMX so I assume that is done. In general I asked about the same rights as CMX in this
post. Not explicitly responded to but in general Stuart says CMX does it OK which leads me to assume he runs CUtils as the same user as CMX (though not as daemon but from the commandline). So when CMX uploads OK, I see no reason why CUtils should not.
Surely we should be discussing the user the web server runs as, as it is that user that executes the upload php script. Has that user got permission to create files in the location required?
Re: Error System uptime
Posted: Fri 01 Sep 2023 1:58 pm
by broadstairs
Freddie it is the same user whoever uploads the data, CMX Utils or me in an FTP client all users files show the same user and group IDs. If CMX uploads fine why not utils?
Stuart
Re: Error System uptime
Posted: Fri 01 Sep 2023 2:02 pm
by HansR
broadstairs wrote: ↑Fri 01 Sep 2023 1:58 pm
Freddie it is the same user whoever uploads the data, CMX Utils or me in an FTP client all users files show the same user and group IDs. If CMX uploads fine why not utils?
Exactly!
Re: Error System uptime
Posted: Fri 01 Sep 2023 2:29 pm
by broadstairs
I've done some more testing and the only errors I get now are that it cannot find forecast but I'll take a look at the wiki and see if I can sort that as I use WXSim for mine. The other issue is that it does not like uploading to the lib su-directory.
Stuart