3

Where does sugarcrm (6.5) and it's fork suitecrm (7.x) set file permissions for files it creates?

I have seen config.php with the variable:

'default_permissions' => array (
    'dir_mode' => 1528,
    'file_mode' => 436,
    'user' => '',
    'group' => '',
),

but that does not seem to be the same permissions that are assigned to cache files. See files in:

cache/smarty/templates_c

which have 644 permissions rather than 660. This means that I have to manual chmod the files if I want to edit them.

So my question: where are file permissions set in sugarcrm/suitecrm?

Star
  • 3,222
  • 5
  • 32
  • 48
seanoc5
  • 161
  • 2
  • 11

3 Answers3

10

After wrestling with this for many moons, I finally tracked down two additional obscure places SugarCRM/SuiteCRM sets file permissions.

utils.php around line 136:

'default_permissions' => array (
    'dir_mode' => 02770,
    'file_mode' => 0660,
    'chown' => '',
    'chgrp' => '',
),

and the kicker for me, Smarty.class.php around line 504:

/**
 * default file permissions
 *
 * @var integer
 */
var $_file_perms           = 0644;

/**
 * default dir permissions
 *
 * @var integer
 */
var $_dir_perms               = 0771;

Hopefully this helps someone else. I'll wait to accept an answer in case someone has more to add.

seanoc5
  • 161
  • 2
  • 11
1

I believe the config.php's

'file_mode' => 436, should actually be

'file_mode' => 432,

Try changing it and see if the files are now given 660

Hope it helps.

Sudheer
  • 2,955
  • 2
  • 21
  • 35
Venkata Krishna
  • 1,768
  • 2
  • 14
  • 21
1

See if /install/installSystemCheck.php is what you are looking for, on my v7.2.1 line 217

Michał Kuliński
  • 1,928
  • 3
  • 27
  • 51