MyBB Documentation

Settings.php Permission Denied

The 1.6 Documentation is no longer maintained and some information may be outdated.

The MyBB 1.6 series reached end of life on October 1, 2015.

This means there will be no more security or maintenance releases for these series and forums running these versions of MyBB may be at risk of unfixed security issues. All administrators are strongly encouraged to upgrade their forums to the latest release of MyBB as soon as possible.

The error occurs when you try to save settings or possibly when activating/deactivating plugins:

Warning: fopen(./inc/settings.php): Failed to open stream: Permission denied in /path/to/mybb/admin/settings.php on line X.
Warning: fwrite(): supplied argument is not a valid stream resource in /path/to/mybb/admin/settings.php on line X+1.
Warning: fclose(): supplied argument is not a valid stream resource in /path/to/mybb/admin/settings.php on line X+2.

Solution: CHMOD the inc/settings.php file to 666 (in other words, make it so that the web server can write to inc/settings.php)

Edit this page on GitHub