$_PLANET_FOLDER = '<%= node[:planet][:dump][:xml_directory] %>/'.$_YEAR.'/';
$_PLANET_REGEX = "/^(planet|changesets)\-\d{6}(\-nolt)?\.osm\.(bz2|gz)$/";
$_MIRROR = 'http://ftp.heanet.ie/mirrors/openstreetmap.org/planet/'.$_YEAR.'/';
-$_PLANET_HTACCESS = $_PLANET_FOLDER.'../../.htaccess';
+$_PLANET_HTACCESS = realpath($_PLANET_FOLDER.'../..').'/.htaccess';
function _MIRROR_FILE_SIZE($url) {
$ch = @curl_init();
return ($curl_result['download_content_length']);
}
-if (posix_getuid() !== fileowner($_PLANET_HTACCESS)) die('User ID of process does not match .htaccess owner'."\n");
+if (!is_writable($_PLANET_HTACCESS)) die('File '.$_PLANET_HTACCESS.' is not writable by current user.'."\n");
if (is_dir($_PLANET_FOLDER)) {
$htaccess_contents = file_get_contents($_PLANET_HTACCESS);
fclose($htaccess_handle);
}
}
-?>