@brainfoolong opened this Issue on January 11th 2022 Contributor

I've seen really strange error messages since a while in our Apache log which have no timestamp or what so ever.

  The system cannot find the path specified.
  The system cannot find the path specified.
  The system cannot find the path specified.
  The system cannot find the path specified.
  'groups' is not recognized as an internal or external command,
  operable program or batch file.

After checking every application i finally found the problem in Matomo (Current version).

The call stack from
https://github.com/matomo-org/matomo/blob/ec3e220b315dbd06a82508e3c0121dbe898cf243/plugins/CoreUpdater/Controller.php#L126
which has a stack of
https://github.com/matomo-org/matomo/blob/ec3e220b315dbd06a82508e3c0121dbe898cf243/plugins/CoreUpdater/Controller.php#L158
https://github.com/matomo-org/matomo/blob/ec3e220b315dbd06a82508e3c0121dbe898cf243/core/Filechecks.php#L106
https://github.com/matomo-org/matomo/blob/ec3e220b315dbd06a82508e3c0121dbe898cf243/core/Filechecks.php#L110
https://github.com/matomo-org/matomo/blob/ec3e220b315dbd06a82508e3c0121dbe898cf243/core/Filechecks.php#L213
https://github.com/matomo-org/matomo/blob/ec3e220b315dbd06a82508e3c0121dbe898cf243/core/Filechecks.php#L142

which at the end tries to execute a groups command on the host, which not exist on windows.
This fill up our apache error log with those error messages.
It is a glitch in the updater and a matomo dev, that knows that system, should patch that. I am not sure what is the best way to do this.

However, all calls to https://github.com/matomo-org/matomo/blob/ec3e220b315dbd06a82508e3c0121dbe898cf243/core/Filechecks.php#L142
which executes this shell command are always pre-checked with a check of !SettingsServer::isWindows(), except in this case.

@sgiehl commented on January 11th 2022 Member

Hi @brainfoolong
Thanks for your detailed bug report. Guess it makes sense to adjust the Filechecks::getAutoUpdateMakeWritableMessage method, so it only performs the methods that work on windows. I will have a quick look and check if I'm able to provide a simple fix for this.

This Issue was closed on January 11th 2022
Powered by GitHub Issue Mirror