[SOLVED] Upgrade failure 2.4.8 to 3.1.1 - Fatal $compile_dir access error

Finally upgraded to 3.1.1. Didn’t go all the way because of PHP version. I am getting a 500 error on the sign in page. The logs show lots of warnings related to file_put_contents and the cache directory and one fatal error: PHP Fatal error: Smarty error: unable to write to $compile_dir ‘/opt/webapps/ojs/cache/t_compile’. Be sure $compile_dir is writable by the web server user. in /opt/webapps/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty.class.php on line 1094

I have poked around and made sure of my file permission. Most of the directories are set on 775 - and mirror the permissions of the previous working version. I am on a linux machine, running PHP 5.6.38 and the Server API is Apache 2.0 Handler.
Any ideas on what I am missing?

Just checked and SELinux is disabled.

Fixed this. For those that are having my same problem take a look at the group ownership of the OJS directory. Mine had somehow gotten changed. Once I sudo chown for the entire directory, the problem was fixed!