Terminal Permissions

Hi. I’m new to CLI and don’t understand it very much.

I installed 8.8 through Softaculous, but they tell me upgrades need to be done via CLI

So I need to upgrade to 8.8.1. Can someone lead me through and confirm or correct these steps?

  1. Create an upgrade folder and upload the entire 8.8.1 downloaded files into that folder?

  2. Log in to cPanel and go to Terminal

  3. There i see jailshell-4.2$ and flashing cursor

  4. Reset permissions: Is that entering: chmod +x ./bin/console ?

  5. Enter this: ./bin/console suitecrm:app:upgrade -t SuiteCRM-8.8.1

  6. Reset permissions? Is this the same as #4 or a different command?

Thank you


Set the required permissions

If you are using the terminal you can do this by running:

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

Do I need to do that in Step 4 and Step 6?

Yes, you need to run those permissions commands in step 4 & 6 without fail. Otherwise, your upgradation will get failed.

1 Like

thank you very much.

So it’s this:

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

/bin/console suitecrm:app:upgrade -t SuiteCRM-8.8.1

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

Correct?

Yes, as long as your user & group is set to www-data

as long as your user & group is set to www-data? What does that mean?

And last question, after this is done do I delete the upgrade folder?

  1. Few people set it to different user & group.

You can go to your suitecrm folder and run the below command:

ls -l

It will show you, what is user set to your files.

  1. You don’t need to delete that folder.

Checkout these video, if you are still confuse:

1 Like

How do I go to CRM folder? In terminal?

Sorry, for these questions, I’ve never done CLUI but I can learn quickly.

watch the second video that I have shared.

It is usually in the public_html folder.

/home/USERNAME/public_html/

I figured that out. I am up to

find . ! -user www-data -exec chown www-data:www-data {} ;

But I get www-data’ is not the name of a known user

Hello Vincent,

try to talk to AI about this.
Especially for things like that (quickly learning about server setups / CLI / Linux / webhosting basics) AI will be able to support and elaborate in no time.

ls -lah

Is what I’m usually using to find out about the folder permissions.
On shared hosting environments it could be, that your FTP user is different from your webserver user.
And even then, your webserver user and group might differ.

Over all, SuiteCRM is much more complex than something like WordPress.
It’s not recommended to be installed on a shared environment (even though it might work).
Eventually, you’re working on the brain of your company that you want to stick to over the next 5 - 10 years. You’ll need some knowledge to take care of the environment for the CRM to support your business in a reliable way.

1 Like

Bastian,
I’m almost there.
Per second video I uploaded the zip file to my crm folder, tmp/package.upgrade

I go into terminal and cd to my crm folder and run

/bin/console suitecrm:app:upgrade -t SuiteCRM-8.8.1

and get no such file or directory.

What did I miss?

You need to run it from the SuiteCRM root folder

For example,

/something/public_html/crm/

1 Like

I am

jailshell-4.2$ /mydomainfolder/crm/bin/console suitecrm:app:upgrade -t SuiteCRM-8.8.1
jailshell: /mydomandolder.com/crm/bin/console: No such file or directory

(it’s below public html)

Go to crm folder.

cd /mydomandolder.com/crm/

Verify the folder location by using the below command:

pwd

Then, run the below command on the terminal

./bin/console suitecrm:app:upgrade -t SuiteCRM-8.8.1

AHH! I was missing the DOT at the beginning (see above). Rookie mistake LOL

But now I can’t load website

https://musicbraintraining.com/crm/public/index.php#/home

Can’t provide a secure connection.

Actually I have wordpress in main folder and crm as a subsfolder to the install messed up my wordpress htaccess where I believe the problem is. I’ll figure out how to fix that

thanks for all the help

Best to create a subdomain for the CRM.
A sub folder isn’t very flexible - e.g. if you want to migrate to another server later on with only your CRM, the directory structure isn’t the same anymore.

1 Like