How to Fix the OpenX Cache Permissions Bug

December 6th, 2009  |  Published in Internet, Technology  |  13 Comments

There’s a bug in OpenX on some installations where this error is displayed when trying to login:

Error: File permission errors have been detected, and must be fixed before you can continue….

chmod -R a+w /home/[dir]/openx/var/cache

Running that command may fix it once, but it’ll be back the next time the maintenance script runs.

Here is how to fix it:

  1. Go to your openx installation directory
  2. Open up plugins/deliveryCacheStore/oxCacheFile/oxCacheFile.delivery.php
  3. Add the following code to line 102 (right before the line “if (PHP_SAPI == ‘cli’)”):
    @chmod($filename, 0777);
  4. Save the file
  5. Run the maintenance script again

Viola! The permissions will now be set correctly when the maintenance script runs.

[BTW, if you need any openx or website help, I'm available for hire through my design company, Rainsong Media]

Like what you see? Subscribe to the RSS feed.

Responses

  1. Travis says:

    December 7th, 2009 at 4:09 pm (#)

    Thanks so much. Your sharing saved me hours of headache. Well done.

    TTFN
    Travis

  2. Josh Sowin says:

    December 7th, 2009 at 4:52 pm (#)

    Your welcome, glad you found it helpful!

  3. Alex says:

    December 23rd, 2009 at 5:11 am (#)

    I add following line, but nothing happens…

    /var
    /var/cache
    /var/plugins

    not writable all… var folder

    But cmode is 777
    How to fix it?

  4. mounir says:

    January 15th, 2010 at 4:16 pm (#)

    I’m having same issue as Alex.
    Any idea on why it’s happening?
    thanks

  5. Ellis Benus says:

    January 19th, 2010 at 5:24 pm (#)

    Same issue here too… Help…

  6. Aamer Jamal says:

    May 4th, 2010 at 4:28 pm (#)

    yep i have the same issue that although i gave the permission 777 to var folder it still giving the error is it because the hosting is on shared server any fix for it???

  7. Richard says:

    May 28th, 2010 at 6:02 pm (#)

    Same problem aswell. is there no fix yet? Var folder has 777 and so do the subs..

  8. john says:

    July 15th, 2010 at 3:46 am (#)

    i have this in my file

    if (PHP_SAPI == ‘cli’) {
    @chmod($filename, 0777);

    Where does it supposed to be inserted when you said before if (PHP_SAPI == ‘cli’)?

  9. russo3000 says:

    October 7th, 2010 at 5:19 am (#)

    A simple “chmod -R a+w /var/www/openx-2.8.4/var/cache” will fix it.

    -R a+w is not 777

  10. delisse says:

    January 13th, 2011 at 12:03 pm (#)

    Thanks !!!! its ok now !

  11. Jocuri says:

    February 25th, 2011 at 11:29 am (#)

    File permission errors have been detected, and must be fixed before you can continue.
    To fix the errors on a Linux system, try typing in the following command(s):

    /var
    /var/cache
    /var/plugins
    /plugins

    any fix for it???

  12. Jocuri says:

    March 3rd, 2011 at 11:52 am (#)

    if
    /var
    /var/cache
    /var/plugins
    /plugins

    are chmod-ed to 777 it world writeble and the problem is in the application, maybe php has some restrictions.

  13. Jocuri says:

    June 8th, 2011 at 1:16 pm (#)

    Nevermind I fixed the error, the files weren’t 777.
    This tutorial really saved me some time, thank you very much :)

Leave a Response