MyBB Community Forums

Full Version: CHMOD discrepancies
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all,

I am a bit confused as to the chmod settings. In the wiki it states:
inc/config.php 777
inc/settings.php 777
uploads/ 777
uploads/avatars/ 777

but in the help file in the download it states:

CHMOD the following files to 666 (ie, make sure that PHP can write to them).
./inc/settings.php
./uploads
./uploads/avatars
./cache
./cache/themes

and in the admin area it states that I need to set ./inc/config.php to 777

which seems to be very dangerous indeed!

So can anyone give me the right chmod settings for all files?

Regards,

Martin
Go with the first settings... After you install etc. Just CHMOD config.php to 666 or 664 either one works.
That sounds kinda dangerous giving everyone permission to do whatever they want those files/folders.

Regards,

Martin
inc/settings.php 777
uploads/ 777
uploads/avatars/ 777

Nothing really can be done to those so they are safe but with config.php just needs 777 for installation... After installation you can change it to 664 or 666.

inc/settings.php 777 = Manages certain MyBB Settings
uploads/ 777 = Must be 777 for user attachment uploads
uploads/avatars/ 777 = Must be 777 so mybb can upload the user uploaded avatars
For instance I have inc/settings.php set to 666 which seems to give me no trouble at all. That's why I find it so confusing that in one place it states chmod to 666 and somewhere else it states cmod to 777.

Martin
If 666 is needed, 777 will also work. It will mean in has more rights than are needed, but it still has what it needs to function properly.
777 for directories
666 for files

Keep in mind that giving files 777 permissions allows them to be executable and can be a potential security risk for the entire site and possibly the server if it's configured poorly.

I use these settings just fine. As a matter of fact once your config.php is written after install you can chmod it 644 to prevent it being hacked by a shared hosting script. Often shared hosting opens you up to cross site hacks and they go after any files with 666 permissions.
If you want a definitive list:

Needed:
  • ./inc/config.php > 666 for install, 664 after
  • ./inc/settings.php > 666
  • ./cache/ > 777
  • ./cache/themes/ > 777
  • ./uploads/ > 777
  • ./uploads/avatars/ > 777
Optional:
  • ./admin/backups/ > 777 (to be able to save backups there via the ACP backup manager)
  • ./inc/languages/*language*/ > all files 666 (to edit them in the ACP)
  • ./inc/languages/*language*/admin/ > all files 666 (to edit them in the ACP)

Smile
Hello,

What would be the correct chmod setting for the admin folder?

Regards,

Martin
The admin folder itself can be the default 755.