Just for giggles I did do a complete search for 777, 666 and 711 to see how many files talk about changing permissions. There are a few.
I am not in production yet, but yes, i agree these need to be addressed and am surprised that no one has brought it up before.
Here's what I found. Please note the file name is UNDER the lines of code from that file, not above it.
#####################
#FUDforum directory:
#####################
$perms = $GLOBALS['FUD_OPT_2'] & 8388608 ? 0700 : 0777;
$perms = 0711;
if (!@is_dir($path) && !@mkdir($path, 0777)) {
$perms = $GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666;
if (!@is_dir($path) && !@mkdir($path, 0777)) {
if (!@is_dir($path) && !@mkdir($path, 0777)) {
./include/compiler.inc
@chmod('msg_'. $s, ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
./include/theme/default/imsg_edt.inc
@chmod($loc, ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
./include/theme/default/attach.inc
chmod($GLOBALS['MSG_STORE_DIR'] .'private', ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
./include/theme/default/private.inc
$perms = $GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666;
$perm = 0777;
$perm = 0666;
./include/file_adm.inc
chmod($GLOBALS['MSG_STORE_DIR'] .'pages', ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
./include/page_adm.inc
@chmod($loc, ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
./src/attach.inc.t
@chmod($FILE_STORE . $aid .'.atch', ($FUD_OPT_2 & 8388608 ? 0600 : 0666));
./src/ppost.php.t
chmod($GLOBALS['MSG_STORE_DIR'] .'private', ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
./src/private.inc.t
@chmod('msg_'. $s, ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
./src/imsg_edt.inc.t
#################################
#/forum directory
#################################
@chmod('msg_'. $s, ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
@chmod($loc, ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
chmod($GLOBALS['MSG_STORE_DIR'] .'private', ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
chmod($GLOBALS['MSG_STORE_DIR'] .'private', ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
./theme/default/pmsg.php
chmod($GLOBALS['MSG_STORE_DIR'] .'private', ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
./theme/default/thr_exch.php
@chmod('msg_'. $s, ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
@chmod($loc, ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
./theme/default/post.php
@chmod('msg_'. $s, ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
@chmod($loc, ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
./theme/default/modque.php
@chmod('msg_'. $s, ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
@chmod($loc, ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
./theme/default/movemsg.php
@chmod('msg_'. $s, ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
@chmod($loc, ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
./theme/default/mmod.php
@chmod($loc, ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
./theme/default/getfile.php
chmod($GLOBALS['MSG_STORE_DIR'] .'private', ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
@chmod($loc, ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
@chmod($FILE_STORE . $aid .'.atch', ($FUD_OPT_2 & 8388608 ? 0600 : 0666));
./theme/default/ppost.php
chmod($GLOBALS['MSG_STORE_DIR'] .'private', ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
./theme/default/pmsg_dump.php
$dirperms = 0777;
$fileperms = 0666;
$dirperms = 0711;
./adm/admlock.php
if (!@mkdir($cur_dir .'/'. basename($_GET['mkdir']), ($FUD_OPT_2 & 8388608 ? 0700 : 0777))) {
@chmod($fdest, ($FUD_OPT_2 & 8388608 ? 0600 : 0666));
./adm/admbrowse.php
if (!@is_dir($root_nn) && !@mkdir($root_nn, 0777)) {
mkdir($root_nn.'/tmpl', 0777);
mkdir($root_nn.'/tmpl', 0777);
./adm/admtemplates.php
$mode = ($FUD_OPT_2 & 8388608 ? 0600 : 0666);
./adm/compact.php
Although there are some repeated lines from above, these are the times I could find references to chmod or mkdir
fud_mkdir($GLOBALS['WWW_ROOT_DISK'].'theme', $perms);
fud_mkdir($GLOBALS['WWW_ROOT_DISK'] .'theme/'. $tname, $perms);
fud_mkdir($GLOBALS['INCLUDE'] .'theme', $perms);
fud_mkdir($GLOBALS['INCLUDE'] .'theme/'. $tname, $perms);
if (!@is_dir($path) && !@mkdir($path, 0777)) {
if (!@is_dir($path) && !@mkdir($path, 0777)) {
@chmod($file, $perms);
if (!@is_dir($path) && !@mkdir($path, 0777)) {
./include/compiler.inc
@chmod('msg_'. $s, ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
./include/theme/default/imsg_edt.inc
@chmod($loc, ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
./include/theme/default/attach.inc
chmod($GLOBALS['MSG_STORE_DIR'] .'private', ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
./include/theme/default/private.inc
function fud_mkdir($path, $perms=0755)
if (!mkdir($dir, $perms)) {
if (!is_dir($d) && !mkdir($d)) {
chmod($d, $dperm);
@chmod($d, $perms);
if (!chmod($file, $perm)) {
./include/file_adm.inc
chmod($GLOBALS['MSG_STORE_DIR'] .'pages', ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
./include/page_adm.inc
@chmod($loc, ($GLOBALS['FUD_OPT_2'] & 8388608 ? 0600 : 0666));
./src/attach.inc.t
@chmod($FILE_STORE . $aid .'.atch', ($FUD_OPT_2 & 8388608 ? 0600 : 0666));
./src/ppost.php.t
|