What are the correct Suitecrm 8 folder permissions?

Hello,

Most websites install to the website root directory which is normally public_html

However when you unzip Suitecrm 8 you have to change the website root directory to public_html/public for the app to work.

In the installation instructions there are a few commands to set the correct file and group permissions. At what level do you run these commands i.e. public_html or public_html/public ? Notes are not very clear.

What I’m really asking for is an easy to understand description of what the file and directory permissions should be starting at public_html so there is no possibility of confusion. Can anyone help ?

I’m also interested to know why public_html/public was chooses rather than the normal public_html as the document root ?

Thanks.

public_html is not a SuiteCRM thing at all. It is simply a typical web root name in shared hostings, etc.

The new SuiteCRM v8 has added a top level directory that is not served publicly, and then put all the public website under the public directory. This makes sense for security reasons, and helps manage deployments.

You should point your web root to SuiteCRM’s public directory (if your hosting puts your assets unders public_html, then that would be public_html/public in your case.

You should set ownerships and permissions at SuiteCRM top-level, above public, so that other top-level directories such as core and dist also get them.

Hey
Here is the exact commands to set the proper permissions

find . -type d -not -perm 2755 -exec chmod 2755 {} \;
find . -type f -not -perm 0644 -exec chmod 0644 {} \;
find . ! -user www-data -exec chown www-data:www-data {} \;
chmod +x bin/console

These commands should be run (in your case) in the public_html folder

While as pgr pointed out your webserver root for SuiteCRM Should be the public_html/public folder