Email attachments no longer being stored in upload directory

Running 7.8.31 under CentOS 7 and php 7.0. A couple of days I used yum to upgrade my server which hosts SuiteCRM and after a couple of days I realized that email attachments are no longer stored in the upload directory. In fact, despite incoming e-mails with attachments I have nothing new in uploads after July 9…

SuiteCRM runs under apache:apache, the file and directory permissions seems to be correct but just to make sure I ran the following commands on the installation:
chmod -R 755 .
chmod -R 775 cache custom modules themes data upload config_override.php

Unfortunately nothing changed after that.

Googling I found multiple issues with file permissions for SuiteCRM, including recommended settings for config.php in File permissions,

Upon checking my config.php I found:
array (
‘dir_mode’ => 1528,
‘file_mode’ => 432,
‘user’ => ‘apache’,
‘group’ => ‘apache’,
),

I changed it to:
array (
‘dir_mode’ => 1517,
‘file_mode’ => 420,
‘user’ => ‘apache’,
‘group’ => ‘apache’,
),

As suggested in the link above but no change. Granted I did not restart apache but for SuiteCRM would that be required to re-read config.php?

Are there any other issues I can look at to figure out why attachments are no longer stored in uploads? Whenever I try to access an attachment I get the message “Invalid File Reference” and when I look in the upload directory I see no new files after July 9.

By the way, I checked the programs updated by the yum update command and neither apache nor php is among them but there are maybe 30 other programs, none of which at a quick glance seem pertinent to SuiteCRM.

But, I did restart the server after running the yum update command and that might be the reason for the problem. Even so, this was bound to happen sometime so I am back at finding out where the problem lies and how to solve it.

Thank you.

Yeah, SuiteCRM doesn’t require a restart to read changes in the config file. So that should be ok.

Lets start off with logging, what does your SuiteCRM log and PHP error log say when you know an attachment has came in?

I just saw something on GitHub which suggests this might actually be a bug

1 Like

I tracked it down to a SELinux access issue although I do not understand why this happened after updating the system and rebooting it. As I can tell, there were no updates affecting this but I could be wrong of course.

Anyway, after restoring selinux contexts the system is now working again.