Skip to content

Instantly share code, notes, and snippets.

@esimonetti
Last active August 27, 2019 10:17
Show Gist options
  • Save esimonetti/08889c582460abbac2b8285ec08807c1 to your computer and use it in GitHub Desktop.
Save esimonetti/08889c582460abbac2b8285ec08807c1 to your computer and use it in GitHub Desktop.
Change sugar upload dir to another disk/mount
...
...
# file path will depend on the installation path or where the file should be
# if this needs to be executed everywhere (even from cron), consider setting it on php.ini instead of the .htaccess
php_value auto_prepend_file /var/www/html/sugar/prepend.php
...
...
$sugar_config['upload_dir'] = '/my/external/upload';
<?php
define('SHADOW_INSTANCE_DIR', '/my/external/upload');
#!/bin/bash
# something similar to the commands below, based on the environment settings and apache user
mkdir -p /my/external/upload
chown -R www-data:www-data /my/external/upload
chmod -R 700 /my/external/upload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment