File permissions persistently changing to 655


For some reason I have to reset the file permissions every time i upgrade.

However this time (upgrading 7.3 to 7.3.1) the permissions keep reverting back to their previous settings, which happens within a few seconds (i am setting them with chown/chmod etc.)

The attached image shows the files that are reset themselves to 675. I’ve also noticed that the owner is changing to root from www-data?

Do you have any idea what could be causing this?


The permission issues seem to be limited to the contents of the cache/modules folder, but when i delete the contents of this folder its quickly populated again, however the files have various permissions and owners?

I turned off developer mode and deleted the contents of cache/modules and ran the upgrade check again. This time it passed (despite the files being re-created in the background with owners of root or www-data).

However when i upload the upgrade file, clicking next takes me back to the main index.php homepage. The next time i visit admin>upgrade wizard it goes directly to the Upload Upgrade Page without doing a preflight check - even on another device?


The permission issues seem to be limited to the contents of the cache/modules folder, but the files were quickly populated again after being deleted (with the same variety of permissions).
After turning off developer mode and deleting the contents of cache/modules the pre-flight check passed (despite the files having been re-created in the background with the same permissions). I’m not sure what the implications of deleting the cache/modules folder are, but so for the upgrade seems to have worked.

I’ve been working at this for many hours and received help in linux irc channels etc, but the only thing i can think of that solved the problem was turning off developer mode before upgrading?

I get the same strange behavior for the /cache directory. It’s not only blocking the upgrades, but also the installation of custom build modules. I used the same workaround Bungle.

I did a clean install of 7.3.1. and was supprised by the default settings in config.php for dir_mode and file_mode;
‘default_permissions’ =>
array (
‘dir_mode’ => 1528,
‘file_mode’ => 432,
‘user’ => ‘’,
‘group’ => ‘’,

I guess these are not the correct ones. Which are the correct ones.?




The “default_permissions” in config.php can differ depending on your setup, but we recommend the setting:

My config file also had dir_mode=>1528 and file_mode=>432.

I’ve set them as recommended and hopefully that will sort it for the next upgrade.

thank you.

I am getting same issue,while upgrading the instance to 7.3.1.

can u please help me on this.


Hi Manasa,

Firstly i changed the file permissions in suitecrm by logging into the server using putty and running the following commands:

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

However, the upgrade was still failing and giving me file permission errors.

The next step was to disable the ‘developer mode’ in suitecrm>admin>system settings and delete the contents of the cache/modules folder.

The upgrade then worked for me.

Hope this helps.



Thanks.It is working for me.

Thanks & Regards,