Location: PHPKode > projects > Cynus > cynus/install/install_module.php
<?php
/**
 * @file install_module.php -- Chmod's the directory one way or the other
 * @Id $Id: install_module.php,v 1.2 2004/07/30 17:21:30 brett Exp $
 *
 * Cynus - a web-based content manager
 * Copyright (C) 2003 Brett and Jason Profitt
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or (at
 * your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 */

$dir_perms = base_convert(@fileperms('../modules/'), 10, 8);
$dir_perms = substr($dir_perms, (strlen($dir_perms) - 3)); 
umask(000);
if($dir_perms == '777') {
	if(@chmod('../modules/', 0755)) {
		print "The modules directory is now secure.  Please secure Cynus by running the secure.sh script in the Cynus base directory.";
	}
	else{
		print "Cynus was unable to change the permissions of the modules directory.";
	}
}
else{
	if(@chmod('../modules/', 0777)){
		print "The modules directory is now very insecure, be sure to run this again after you complete the module installation";
	}
	else{
		print "Cynus was unable to change the permissions of the modules directory.";
	}
}



?>
Return current item: Cynus