Save GeoIP DB in user dir #13396
Labels
answered
For when a question was asked and we referred to forum or answered it.
not-in-changelog
For issues or pull requests that should not be included in our release changelog on matomo.org.
In the Geolocation settings, there is an option to install the GeoIP database. However, as I have the Matomo code installed in /usr/share/matomo/ and owned by root (as per the Debian package install), Matomo is unable to save the file.
Please change the location of this database to somewhere in the user directory, which is writeable by the server.
I have changed
PIWIK_INCLUDE_PATH
toPIWIK_USER_PATH
at:https://github.com/matomo-org/matomo/blob/3.x-dev/plugins/GeoIp2/LocationProvider/GeoIp2.php#L128
and
https://github.com/matomo-org/matomo/blob/3.x-dev/plugins/UserCountry/LocationProvider/GeoIp.php#L202
After creating a
misc
subdirectory in the user dir, it is successfully downloading the file.The text was updated successfully, but these errors were encountered: