Default chmod ?

  • Just a quick general question...


    What is the default chmod for the directors? I figure more of it should be 755, but I also figure cache on some boxes may need to be 777.


    So which folders should you pay extra attention toward?

  • Hi


    as long as the user, PHP runs as, is able to read and write to every file and folder everything is fine. Depending on your exact setup 0700 can be enough for folders.

    Alright... Let me re-ask the question, because I really do want a direct answer.


    WHICH folders NEED special permissions?

  • Hi


    every folder and every file must be writable in order to support the automated updates.

    Alright... 755 it is.


    Not idea for shared host though. Many shared 777 is the only option for writable

  • 755 for most of the cases and 777 only if fast CGI is used.

    As I said... Not idea for shared host.


    I use php-fpm so 0755 works just fine for me.


    But for many known shared how, Fast CGI is the norm so 0777

  • @Throwholics you exactly missed it. :P
    chmod 777 can't be used with FastCGI, it would return an error. FastCGI never needs chmod 777. It maximally needs chmod 755.


    Most of other configurations need chmod 777 because the PHP user is not the same as the FTP user.

  • I did not missed it I mixed it :D
    But yeah you are right ^^

    Don't feel bad. It's been so long since I've had shared host... That the how and why was escaping me too. :P


    I just know I have a few people that I help out who still use it and 777 is their only answer.

  • I just know I have a few people that I help out who still use it and 777 is their only answer.

    Sadly many hoster enforce this by their setup.


    WCF needs write permission on folders and files. I've my files with 644, and it should in theory be possible to have the config.inc.php on 400 (although I've not tested that yet).

    "A life is like a garden. Perfect moments can be had, but not preserved, except in memory. LLAP" — Leonard Nimoy

  • Sadly many hoster enforce this by their setup.


    WCF needs write permission on folders and files. I've my files with 644, and it should in theory be possible to have the config.inc.php on 400 (although I've not tested that yet).

    Sadly many hoster enforce this by their setup.


    WCF needs write permission on folders and files. I've my files with 644, and it should in theory be possible to have the config.inc.php on 400 (although I've not tested that yet).

    Same here.


    644 - files
    755 - folders


    Will see how things work when I try to update.... Found a new bug.... Double quotes.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!