I do not understand what permission should I need to set.
Is this correct?
All files and directories (and all files in that directories) to 755
except, files and directories (and all files in that directories): cache custom modules themes data upload config_override.php to 775
After that should I change also and ādefault_permissionsā in config.php and in utils.php?
Nevals these are the values I put both in config.php and in include/utils.php:
ādefault_permissionsā =>
array (
ādir_modeā => 1533, // equivalent to octal to 2775
āfile_modeā => 493, // equivalent to octal to 755
āuserā => āā, // you must replace with the actual value
āgroupā => āyourgroupā, // you must replace with the actual value
),
You will find that include/utils.php has two instances of default_permissions and you have to replace them both.
As you may have noticed in include/utils.php the key user is called chown and the key group is called chgrp. I believe this is a bug and that they should be replaced with user and group respectively.
Please note also that some may argue that 775 and 755 are not safe enough on a shared hosting environment (or even not safe fullstop!)
So if you donāt want to risk you should put different values for dir_mode and file_mode
In other posts Will has recommended to use:
ādir_modeā => 1517, // equivalent to octal to 2755
āfile_modeā => 420, / equivalent to octal to 644
Itās a matter of your choice.
May I add that, when I used these latter values I continued experiencing permissions problems, while with the values I now use they have been dramatically reduced. But this may be due to my environment and may not happen to others.
ā¦ thatās the point: SugarCRM continuosly messes up permissions! So you have to watch them.
Possibly you should have deleted the entire contents of the cache folder (not the folder itself) and run a quick repair and rebuild before deleting the log file.
I have created a php script for me to reset the permissions to the whole SuiteCRM folders to 775 and 755 accordingly. This script executes in less than 10 seconds and I run it when I touch something in Admin (eg add new things) as well as in a nightly cron job.
Permissions vary between different hosting solutions. Our recommended settings are:
ādefault_permissionsā =>
array (
ādir_modeā => 1517,
āfile_modeā => 420,
āuserā => āyouruserā, // you must replace with the actual value
āgroupā => āyourgroupā, // you must replace with the actual value
),
Then running the following commmands inside your SuiteCRM directory:
Lot of issues Iām experiencing with SuiteCRM. You can see all my posts with errors problem
Iām on SiteGround hosting and now I will try Hostgator.
Do you have any recommendation for shared hosting where SuiteCRM will work without problems?
I know that you offer hosting but it is too expensive for my little statup
Hi Amariussi, would you mind sending me this script, it would really help me, Iām not much of a programmer so wouldnāt be able to make one myself but I can implement one. Can you also explain what āuserā and āgroupā means in relation to a hosted platform.
(where you have to change āmysite.comā to the real domain of your site and āsuitecrmrootfolderā to the path to the suiteCRM root folder).
If you open the script you will see that it is a quick and dirty script which could be improved in programming style and user interface. In any case it works fine.
If you want to see what it does you have to change the first line:
$chmod_debug_mode = FALSE;
to:
$chmod_debug_mode = TRUE;
However I do not recommend it because the script will become very slow (instead of a few seconds it will take several minutes)
You may also change the permissions it sets by editing the $change_folders arrays. Currently it sets everything to 755 except the following folders: cache, custom, data, modules, themes, upload and the file config_override.php, which it all sets to 775.
Personally I have set a cronjob that runs the script once every hour. I cannot recommend any usage but thatās the way I use it.
Additionally I run it before and after everytime I have to use the admin part of the SuiteCRM, or if I have to modify some custom code, just in caseā¦
Thank you Amariussi, sorry I didnāt acknowledge sooner. Things were hectic around that time, I am doing a fresh install of Suitecrm so will try this out.
Question: bellow there was assumption that in /include/utils.php there is bug. Where you have chown & chuser, but there must be user & group. So tell me please, that is bug or it must be like that?
Proposal Iām addressing to SuiteCRM staff:
Could you please update your installation guide with permissions recommendations from that tread?