A newbies guide to getting your SugarCRM instance's permissions right

bsoremsugar —  July 19, 2012 — 10 Comments

I came across this post on the forums recently, and thought I would highlight on the blog as a great guide to answering one of the most common questions new Sugar implimentors run into; getting the permissions right. Here’s the script the poster came up with to handle this; be sure to substitute “/full_path_to_Sugar_Installation” with the actual path to your install

**FIND ALL DIRECTORIES AND CHANGE THEIR MOD TO 755
find -P /full_path_to_Sugar_Installation/SugarCRM/ -type d -exec chmod 755 {} ;

**FIND ALL FILES AND CHANGE THEIR MOD TO 644
find -P /full_path_to_Sugar_Installation/SugarCRM/ -type f -exec chmod 644 {} ;

**FIND ALL JAVA FILES AND CHANGE THEIR MOD OT 755
find -P /full_path_to_Sugar_Installation/SugarCRM/ -name *.js -exec chmod 755 {} ;

**cHANGE CONFIG.PHP TO 664

chmod config.php 664

**Except These files need to be 664
cd /full_path_to_Sugar_Installation/SugarCRM/

**(check to make sure you are at the top directory)

pwd

chmod 664 config.php

chmod 664 config_override.php – does not exist by default but is created when modifying System Settings

chmod 664 sugarcrm.log

**The four Directories below need to be 775

find -P /full_path_to_Sugar_Installation/SugarCRM/cache -type d -exec chmod 775 {} ;

find -P /full_path_to_Sugar_Installation/SugarCRM/custom -type d -exec chmod 775 {} ;

find -P /full_path_to_Sugar_Installation/SugarCRM/data -type d -exec chmod 775 {} ;

find -P /full_path_to_Sugar_Installation/SugarCRM/modules -type d -exec chmod 775 {} ;

**All files in the directories below need to be 664
** cache/ and all subdirectories and files
** custom/ and all subdirectories and files
** data/ and all subdirectories and files
** modules/ and all subdirectories and files

find -P /full_path_to_Sugar_Installation/SugarCRM/cache -type f -exec chmod 664 {} ;

find -P /full_path_to_Sugar_Installation/SugarCRM/custom -type f -exec chmod 664 {} ;

find -P /full_path_to_Sugar_Installation/SugarCRM/data -type f -exec chmod 664 {} ;

find -P /full_path_to_Sugar_Installation/SugarCRM/modules -type f -exec chmod 664 {} ;

This should get your permissions in order and make you Sugar instance run without permissions issues. Big thanks to rebdiamond for pulling this together.

10 responses to A newbies guide to getting your SugarCRM instance's permissions right

  1. 

    Another common problem Sugar implementers run into is the lop-sided documentation. Where are the windows settings? Come on!

  2. 
    Michael Joyner July 21, 2012 at 7:37 pm

    Awesome, where was this post when I needed it!

  3. 

    Thanks for this! Very helpful indeed.

Trackbacks and Pingbacks:

  1. Free CRM Software Download | FREE SugarCRM Trial | CRM Blog - September 16, 2012

    [...] SugarCRM Developer Blog » Blog Archive » A newbies guide to … – PHP TO 664 chmod config.php 664 **Except These files need to be 664 cd /full_path_to_Sugar_Installation/SugarCRM/ **(check to make sure you are at the top directory) pwd chmod 664 config.php chmod 664 … Related Posts:CRM in Business – Top CRM for Small BusinessCRM for Macs – Apple Mac Customer Relationship ManagersSugarCRM PluginsSalesforce vs SugarCRM – Top 10 Questions to Ask Before Implementing Your CRMBest Freeware CRM Software [...]

  2. Does SugarCRM require root access? - September 24, 2012

    [...] [...]

  3. Warning: require(cache/modules/Users/language/en_us.lang.php) - February 6, 2013

    [...] [...]

  4. permission of the upload folder - March 19, 2013

    [...] [...]

  5. SugarCRM Permissions | Nerdy Goodness - Mark Morgan's Web Development Blog - php, jquery, css - April 30, 2013

    [...] is another post by John Mertic on the SugarCRM Developer Blog A newbies guide to getting your SugarCRM instance’s permissions right although you’re probably better off going to the original post How to easily set permissions [...]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s