All Attachments/Documents are corrupt

A week or two ago I started receiving emails back from customers that I had emailed saying the attachments to their emails (PDFs and Image files mostly) opened blank white with some of them having weird characters inside them. I went into CRM to the Documents module to open up a few of our documents: price list, product catalog, credit application ,etc. All of them open blank or corrupt. For the previous two years I’ve never had this issue at all. Going further I started checking out some emails imported to accounts and every attachment is also blanked or corrupt. It seems every file in the uploads directory is corrupt!

When I send an email and use attachments from my computer and not from the CRM Documents area there isn’t an issue.

I’m running SuiteCRM 7.8.18 LTS and honestly don’t know when or how this could have happened. The oldest backup I have of our system is the beginning of March and all the files there are corrupted.

Can anyone provide insight to this major issue? All the important attachments to emails hosted in CRM are now useless and it scares me to trust CRM in any way like I have been so I have started saving attachments outside of CRM, which just seems like a huge waste of time.

Hi. Sorry to hear you’re having such a troubling experience…

You can read this post to get a map between your CRM records in the database, and the files in the upload folder.

https://pgorod.github.io/Concepts-Docs-Attach-Notes/

I never heard of this problem before with SuiteCRM, and it’s such a serious problem, I expect it would have shown up by now, if it started at least a month ago.

It is possible that your problem has nothing to do with any PHP bug in SuiteCRM - it could be disk problems, disk controller problems, even network problems or RAM. It could also be some other software standing in the way - an anti-virus, a firewall.

The first thing I would do is try to make 100% sure if the files themselves are corrupted. They could be ok on disk, but then get corrupted when retrieved by SuiteCRM, or when sent over the network, or email.

So I would find out a few ids for some of those files that show corrupted, go get the files directly from disk, and try to open them in a different computer.

Tell me how this goes, and good luck.

Thanks for a prompt and great reply. I should have been more clear and was just caught up in the shock of what had happened. It is possible that something happened to the disk hosting our website and SuiteCRM installation but I ruled it out in my head as 1) We would have received some notice from our hosting provider or 2) More than just the uploads directory would be corrupt… all SuiteCRM files are intact as are both our websites and other files we have on our webspace.

I not only checked the files through CRM, but went into our FTP server and downloaded some of the files and had the same results. I then went into the offline backups we keep on a local server in-house and the two backups we have (March 1 and April 1) produce the same results when trying to open any of the documents in the uploads folder. I’ve also tried opening the files on a few different machines in the office with the same results, whether through CRM, directly from the FTP server, or locally.

We host a key set of files for easy access/re-use when sending out emails such as our catalogs, price lists, etc so I’ve got in and added a revision and re-uploaded the correct file from local storage so that part of my problem isn’t an issue any more… but all the attachments that were imported from emails we’ve received and other documents that we’ve uploaded as part of leads or accounts… that’s a long process to track the documents down and overwrite everything.

I just came to the forum in desperate hope of someone else experiencing this or there being prior knowledge and fixes available!

How many files do you have in the upload folder? One known issue is hitting Linux file system limitations due to an excess of files in that folder.

Maybe you can try running some “check disk” tools on your disk.

There are 1,112 files in the folder… as far as I’m aware that’s not a limit reaching number at all. I wasn’t able to detect and disk errors on our server. I know a bunch of the files are duplicates as I’m sending out emails each week with the same product catalog or price list, but that shouldn’t cause the issue as SuiteCRM gives each a unique name. The total size of those 1,112 files is 664MB.

I haven’t been able to find anything else online, or figure this one out… so I guess that’s that and life moves on. As I mentioned before, I’ve re-uploaded the main files we store as Documents in SuiteCRM and am planning to start saving attachments in emails locally as a safety back-up now in the event this happens again. Thanks for your time and suggestions, much appreciated!

Yes I agree it’s better to move forward.

You are right that those amounts of files and those file sizes shouldn’t be a problem.