Also 755 permission setting is very important rather than 777.
For it to work correctly you need the proper ownership set on the forum directory in the first place.
Your forum directory should be set to apache ownership.
The command to set that will depend on your Distro.
Although if you have a control panel such as Plesk or CPanel, there should be an option to set that or fix ownership & permissions.