MyBB Community Forums

Full Version: What are standard permissions for folders and files?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I just installed MyBB and have had a severe problem getting the permissions right.

I resorted to making all directories 777 and then some files too to get it to work right.

Am wondering what the standard permissions that MyBB expects are?

I read on a thread that they should normally be 755 for folders and 640 or 666 for files. Is that right?

I also read that on rare occasion, such as mine, the standard permissions are not set to be so standard and can be a problem.

I installed MyBB locally on my localhost to test it before installing it at my site. Until I figure this out I have decided not to install it at my host so I have no forum URL to give anyone.

Any input anyone can give me would be most appreciated. I don't want to upload MyBB to my host with a bunch of folders and even files at 777.

Carlos

PS. I should have indicated that I am using MyBB 1.6.8 using MySQLi 5.5.24, PHP 5.3.10-1ubuntu3.3, and running under Linux Mint.

Given the lack of input to this thread I decided to look around the internet for best practices regarding how to secure a website installation under Linux.

It seems that the best thing is to set permissions to 755 (not 777 as indicated in the documentation for MyBB) and 644 (not 666 as indicated in the said documentation again).

So...that's what I did.

I set ALL directories to 755 and ALL files to 644. So far no problems.

Incidentally in case anyone is interested here are the commands I used to set them all at once.

To set ALL directories under the forum to 755 I entered the following into a command prompt.

sudo find /absolute/path/to/forum/ -type d -exec chmod 755 {} \;

To set ALL files to 644 I entered the following.

sudo find /absolute/path/to/forum/ -type f -exec chmod 644 {} \;

If you use the above commands you use them at your own risk!

Carlos
For anyone using the find command lines that I posted about and setting their permissions to what I indicated...I did find one file that needs to be changed.

/inc/settings.php needs to be writable by MyBB (running as user Others I think).

Though the MyBB documentation says to change it to 777 I found that changing it to 606 (allowing Owner and Others to both read and write to this file) is sufficient and more secure. I don't believe there is any reason to allow the user indicated by Group to read or write to this file.

Anyway just thought I would note that for anyone reading this thread and doing anything with what I have said.

Carlos
thanks Carlos!
I too am very leery of setting anything to 777, esp with a product like MyBB which has a publicly verifiable file structure. I hope future revs of MyBB will address this.