Upload Files (e.g., CSV for import) to SugarCRM CE

SugarCRM Community Edition 6.4.0beta3 (Build 7099), using Apache in GNU/Linux (OpenSUSE 11.4 x86_64)

I wanted to upload a CSV file to import into Accounts. Despite the file being under 1MB and the max upload size being something like 10MB, the upload would fail and Sugar would suggest that the max upload size was set too small.

The Fix: 

Check ownership, group, and permissions of the upload folder, and fix accordingly. If you're not sure how, look for other files that have been created by Apache on your server and take note of the group for those files; then, change the group of Sugar upload/ to be the process that Apache runs as, by using a command like chmod -R g+w upload in the root directory of Sugar.

This seems simple and obvious after the fact, but the documentation leads one to ignore that folder when initially installing Sugar. In particular, when I was installing Sugar, the Required File System Permissions on Linux document identified the following files and folders that needed attention:

  • config.php
  • config_override.php – does not exist by default but is created when modifying System Settings
  • sugarcrm.log
  • cache/ and all subdirectories and files
  • custom/ and all subdirectories and files
  • data/ and all subdirectories and files
  • modules/ and all subdirectories and files

The upload folder is missing from that list. (I don't see an quick & obvious way to fix that, otherwise I would correct it myself.)

While I appreciate the obviously large amount of work that has gone into this open-source CRM tool, some rather obvious things are not handled correctly in the installation process. This is just one; another is that if the config.php file is not writable, trying to go to the start of the installation process just leads to a blank page rather than an informative error message.