According to the Gallery2 FAQ (http://codex.gallery2.org/Gallery2:FAQ)
How can I fix the filesystem permissions of the Gallery storage folder?
Usually you get either an ERROR_PLATFORM_FAILURE or the upgrade wizard reports that the filesystem permissions are wrong for your storage folder, i.e. it can't write to all files and subfolders in that folder anymore.
* To fix the problem, you can try the Fix the storage folder (make it writeable) tool in http://example.com/gallery2/lib/support/ on the Filesystem Permissions page. (This tool was added in G2.1.1), older versions don't have it.
* You can also try to change the permissions to 777 (read & writeable for everyone) with your FTP program. If all fails, please ask in the forum for help such that we can verify that it is indeed a filesystem permissions problem. If it actually is one, you'll have to ask your webhost to change the filesystem permissions recursively for you (e.g. chmod -R 777 g2data).
* What might help is removing all cached data from the storage folder. Please see: How can I clear cached data?
* A common issue is:
Error (ERROR_PLATFORM_FAILURE) :
in modules/core/classes/GalleryTemplate.class at line 270 (gallerycoreapi::error)
in modules/core/classes/GalleryTemplate.class at line 200 (gallerytemplate::_initcompiledtemplatedir)
In that case, if the above suggestions do not help, please try to delete g2data/smarty/templates_c/ folder via FTP or whatever tool you use to upload / manage files of your website.
* If the problem does not disappear or is reappearing after it has been fixed for a while, please ask your webhost whether there are any scripts that change the owner of the files to the account owner. This could be the culprit since files are not created / managed by your account, but by the webserver application. We also welcome you to consult the Gallery forums for further expert advice.