Reset the permissions once again, and In the admin_gallery/common/properties.php file, change:
$GLOBALS['permissions'] = array(
'dir' => 0777,
'file' => 0666
);
to:
$GLOBALS['permissions'] = array(
'dir' => 0755,
'file' => 0755
);