FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Installation Issues » What are correct file permissions for 3.04? (I have everything on 666/777, can't be right?)
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Lockups with 500 error is caused by permissions [message #168865 is a reply to message #168864] Wed, 31 July 2013 00:51 Go to previous messageGo to previous message
cpreston is currently offline  cpreston   United States
Messages: 160
Registered: July 2012
Location: Oceanside
Karma:
Senior Member
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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problem importing data before upgrading the forum (2.7.6->)
Next Topic: Maillist.php works from command line but not postfix pipe
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 10:24:09 GMT 2024

Total time taken to generate the page: 0.03382 seconds