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

Can someone explain this line

I know it’s user /group. If the user is GEORGE, what does the input look like now? What is the group?

That’s standard Unix/Linux chown and chmod.

It’s user:group

How to check user:group in the linux?

Use the below command on the terminal:

ls -lah

During install I changed www.data to my host username. So it shows

myusername myysername

Is that ok? Is anything expecting www-data???

It is okay. You can use your username:username to set the file permissions.

1 Like

This is my last question on this topic

2755 vs 755
2700 vs 700

The reset permissions use 2755

I see other posts using a SUDO command and setting to 755

which is correcty 2755, or 755?
Does it matter?

This is correct for the suitecrm v8. It is mentioned in the doc too.

1 Like

Is that ok? Is anything expecting www-data???

Check for references to www-data in config.php and config_override.php

None

So why do I see some posts with things like this

sudo chown -R www-data:www-data .
sudo chmod -R 755 .
sudo chmod -R 775 cache custom modules themes data upload

These are for SuiteCRM v7.x

You can see it in the doc:


I understand. Bottom line 2755 permissions are correct and 755 is not. Right

1 Like

Thats for SuiteCRM 7, the permissions setting for SuiteCRM 8 are different.

There is not a single " correct" permissions scheme, it depends on your system, and what you want.

That “2” in “2755” is for directories, affecting the new files that get created inside them. The instructions for v8 use separate commands to set permissions for files versus directories.

1 Like

Got it now. Thanks much