Title: Error updating Maxmind data
Last modified: August 22, 2016

---

# Error updating Maxmind data

 *  Resolved [Caged](https://wordpress.org/support/users/caged/)
 * (@caged)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/error-updating-maxmind-data/)
 * Got an error in Settings > Category Country Aware goodies > Countries
 * `Error Maxmind IPv4 data file has NOT been updated: Failed to fopen sitename/
   wp-content/plugins/category-country-aware/maxmind/GeoIP.dat.gz for writing: 2
   | fopen(/sitename/wp-content/plugins/category-country-aware/maxmind/GeoIP.dat.
   gz): failed to open stream: Permission denied | /sitename/wp-content/plugins/
   category-country-aware/inc/update_maxmind.php | 132 Error Maxmind IPv6 data file
   has NOT been updated: Failed to fopen /sitename/wp-content/plugins/category-country-
   aware/maxmind/GeoIPv6.dat.gz for writing: 2 | fopen(/sitename/wp-content/plugins/
   category-country-aware/maxmind/GeoIPv6.dat.gz): failed to open stream: Permission
   denied | /sitename/wp-content/plugins/category-country-aware/inc/update_maxmind.
   php | 132`
 * After this i temporarily set the permissions of the plugins to 777. Still i get
   the error message.
 * Am i missing something here?
 * [https://wordpress.org/plugins/category-country-aware/](https://wordpress.org/plugins/category-country-aware/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [wrigs1](https://wordpress.org/support/users/wrigs1/)
 * (@wrigs1)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/error-updating-maxmind-data/#post-5634072)
 * Hi Caged,
 * Is the plugin working apart from being unable to install the latest Maxmind data?
 * I haven’t been able to replicate the issue but suspect it may be file “owner”
   related rather than just permissions.
 * As you are able to set permissions I’m assuming you are able to rename directories
   etc. To help fix/diagnose, could you please try this:
 * 1. In the “plugins/category-country-aware/” folder you will have a sub-directory
   named “maxmind”. Temporarily rename this to “maxmind-old”.
 * 2. Then create a new EMPTY directory called “maxmind” set permissions initially
   to “777”.
 * 3. Under “Settings > Category Country Aware goodies > Countries” uncheck the “
   Update data files now” check box and save. Then recheck the checkbox and save.
 * Let me know if it reports successful update.
 * Other info to help diagnose: Could you tell me what permissions you have for 
   the original Maxind directory and the files within it. Mine are 755 and 644.
 * How did you upload the CCA plugin, via your sites Dashboard->Plugins page, FTP,
   CPanel’s File Manager?
 *  Thread Starter [Caged](https://wordpress.org/support/users/caged/)
 * (@caged)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/error-updating-maxmind-data/#post-5634118)
 * Will try this later today and report back, thanks.
 *  Plugin Author [wrigs1](https://wordpress.org/support/users/wrigs1/)
 * (@wrigs1)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/error-updating-maxmind-data/#post-5634169)
 * Hi Caged,
 * Please ignore my previous suggestion (you would need upload a copy of geoip.inc
   to the new directory).
 *  Instead try this (with your original maxmind directory):
 * 1. download and unzip [http://wptest.means.us.com/publicsource/cca_fix.zip](http://wptest.means.us.com/publicsource/cca_fix.zip)
 * 2. deactivate the cca plugin
 * 3. in the plugins/category-country-aware/” folder rename cca_textwidget.php to
   cca_textwidget.old and FTP/upload the “new” version from the zip
 * 4. in the plugins/category-country-aware/inc/” folder rename update_maxmind.php
   to update_maxmind.old and FTP/upload the “new” version from the zip
 * 5. activate the plugin
 * Let me know if this works.
 * If so I’ll issue a new version of the widget.
 *  Thread Starter [Caged](https://wordpress.org/support/users/caged/)
 * (@caged)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/error-updating-maxmind-data/#post-5634171)
 * Roger that, testing your new solution tonight. I’ll post the results here.
 *  Thread Starter [Caged](https://wordpress.org/support/users/caged/)
 * (@caged)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/error-updating-maxmind-data/#post-5634174)
 * I followed the intructions provided.
 * After re-activating the plugin first i got this error when trying to adjust the
   settings in the Country tab.
 * `Maxmind files have NOT been updated: Unable to create Maxmind Update directory(/
   sitename/wp-content/plugins/category-country-aware/maxmind_data/ ) existing Maxmind
   data will continue to be used.`
 * I tried the following as well, but none of the methods fixed it:
    – create maxmind_data
   directory – set maxmind_data directory permissions to 777 and Activate/de-activate
   settings
 * Let me know if i can be of any further assistance, i hope this helps.
 *  Plugin Author [wrigs1](https://wordpress.org/support/users/wrigs1/)
 * (@wrigs1)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/error-updating-maxmind-data/#post-5634212)
 * Hi Caged,
 * Thanks for the feedback v.useful you did exactly what i would have done. Without
   knowing the cause of the prob I was second guessing the issue might be file owner
   related e.g. if you uploaded a file via your servers control panel it may have
   a different owner to one uploaded by WP and this can cause probs on writing to
   files.
 * _“Let me know if i can be of any further assistance”_ thanks, much appreciated.
   If you have time:
 * Can you remember the error reported on “update” after you had manually created
   the maxmind_data folder – was it basically the same as the error msg you first
   reported?
 * What are your directory permissions for:
 * /sitename/wp-content
    /sitename/wp-content/plugins /sitename/wp-content/plugins/
   category-country-aware
 * Do you know what server you are using e.g. Linux/Apache, Microsoft/IIS etc.
 * Are you running your own dedicated server?
 * The directory error also indicates it is a permissions and possibly owner issue.
 * If /sitename/wp-content/ permissions are less restrictive than ANY of the other
   directories in the path to the “Maxmind” dir you can try Test/Fix 2 [http://wptest.means.us.com/publicsource/cca_test2.zip](http://wptest.means.us.com/publicsource/cca_test2.zip)
   this places the maxmind_data folder directly under wp-content. Follow the instructions
   as per previous test/fix.
 *  Plugin Author [wrigs1](https://wordpress.org/support/users/wrigs1/)
 * (@wrigs1)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/error-updating-maxmind-data/#post-5634221)
 * I’ve modified the test2 zip. It now attempts to create the mamaxmind_data folder
   under wp-content and if this fails to write the Maxmind files to the wp-content/
   uploads/ folder (a technique used by the geoip_detect plugin).
 * If you try this, can you let me know whether it creates the wp-content/maxmind_data
   directory with files, and if not whether it has written GeoIP.dat and GeoIPv6.
   dat to wp-content/uploads/. Note this is a test only I will need to tidy and 
   add additional code.
 *  Plugin Author [wrigs1](https://wordpress.org/support/users/wrigs1/)
 * (@wrigs1)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/error-updating-maxmind-data/#post-5634343)
 * I’ve not heard back from caged but I’ve uploaded version 0.8.0 which should fix
   the problem (if there are permissions probs on the plugin dir then the WP upload
   folder is used instead).
 * Note this version requires your server to be using PHP5.3 or greater (most of
   you). 0.8.0 also fixes compatibility issues with other GeoIP plugins.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Error updating Maxmind data’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/category-country-aware.svg)
 * [Category Country Aware Wordpress](https://wordpress.org/plugins/category-country-aware/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/category-country-aware/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/category-country-aware/)
 * [Active Topics](https://wordpress.org/support/plugin/category-country-aware/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/category-country-aware/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/category-country-aware/reviews/)

## Tags

 * [permissions](https://wordpress.org/support/topic-tag/permissions/)

 * 8 replies
 * 2 participants
 * Last reply from: [wrigs1](https://wordpress.org/support/users/wrigs1/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/error-updating-maxmind-data/#post-5634343)
 * Status: resolved