@blueyed opened this Issue on March 13th 2015

I am seeing the following error from the cron job:

ERROR CoreConsole[2015-03-13 01:05:04] Got invalid response from API request: http://a.example.com/index.php?module=API&method=CoreAdminHome.runScheduledTasks&format=csv&convertToUnicode=0&token_auth=removed&trigger=archivephp.
Response was 'task,output Piwik\Plugins\ExamplePlugin\Tasks.myTask,Time elapsed: 0.000s Piwik\Plugins\UserCountry\GeoIPAutoUpdater.update,
    ERROR: GeoIPAutoUpdater: failed to download 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz' to '/var/piwik.git/misc/GeoIPCity.dat.dat.gz': Error while creating the file: /var/piwik.git/misc/GeoIPCity.dat.dat.gz'

The problem is that the "misc" directory is not writable.

The documentation at http://piwik.org/docs/update/ says:

After the one click update has successfully completed, you may also choose to change back your Piwik folder and files to read only permissions (except the tmp/ folder which must be writable at all times).

So I would assume that it's not necessary to change the permissions for the whole "misc" folder. It can be expected though to make the final GeoIPCity.dat file writable.

I've tried to touch and chmod the GeoLiteCity.dat.dat.gz file, but then
the next job failed with:

GeoIPAutoUpdater: failed to unzip '/var/piwik.git/misc/GeoIPCity.dat.dat.gz' after downloading 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz': The downloaded file is not a valid GeoIP database. Please re-check the URL or download the file manually.'

That was maybe caused because the target file could not be written.

@mattab commented on April 8th 2015 Owner

Hi @blueyed - good point, thanks for noting our documentation is wrong here.

(issue scope: let's update our documentation to mention misc/ dir must be writable)

@mattab commented on April 8th 2015 Owner

Text updated in user guide:

After the one click update has successfully completed, you may also choose to change back your Piwik folder and files to read only permissions. Important: the tmp/ folder must be writable at all times. Note that if you use the GeoIP auto updater feature, you will also need to make the misc/ folder writable.

This Issue was closed on April 8th 2015
Powered by GitHub Issue Mirror