Results 1 to 4 of 4

Thread: SugarCRM and Permissions

  1. #1
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default SugarCRM and Permissions

    In the config.php we have an array that controls permissions and depending on which OS you are using and sometime what addins to that OS you may have to change that setting.

    You can tell you need to change the permissions when you get an error like:

    Warning: chmod() [function.chmod]: Operation not permitted in /usr/local/www/data/sugarcrm/include/utils/sugar_file_utils.php on line 189
    Specified directory '' for zip file '/usr/local/www/data/sugarcrm/cache/upload/SugarPro-to-SugarEnt-Conversion-5.1.0c.zip' extraction does not exist.


    The defaults are

    PHP Code:
      'default_permissions' => 
      array (
        
    'dir_mode' => 1528//2770
        
    'file_mode' => 432,
        
    'user' => '',
        
    'group' => '',
      ), 
    but if you are running freebsd, SELinux, CPanel (or any other linux "head-end") you need to use these settings.


    PHP Code:
      'default_permissions' => 
      array (
        
    'dir_mode' => 504//0770
        
    'file_mode' => 432,
        
    'user' => '',
        
    'group' => '',
      ), 
    as these OSs don't handle the 'sticky' bit the same way Linux does. I have had a few installs where we needed to use

    PHP Code:
      'default_permissions' => 
      array (
        
    'dir_mode' => 511//0777
        
    'file_mode' => 511,
        
    'user' => '',
        
    'group' => '',
      ), 
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

  2. #2
    brian.goodman is offline Member
    Join Date
    Mar 2009
    Posts
    11

    Default Re: SugarCRM and Permissions

    Hello Ken,

    I believe that users also need to change the permissions in the /include/utils.php (~line 160) so the permissions survive the repair/rebuild processes.

    Here is my experience:

    On a new install, I was having all kinds of trouble related to permissions. I followed the WIKI advice shown here http://www.sugarcrm.com/wiki/index.p...sions_on_Linux on changing permissions in the cache, custom, data and modules directories and the config.php file and everything worked fine. (in my case the rights were 777 and 666)

    This cured all my problems, BUT, after any repair/rebuild processes, the problems reappeared.

    Matching your advice, some forum users recommended changing the dir_mode and file_mode values in config.php to match those used in the installation directory & file rights described in the WIKI. I did that BUT there were still problems after repair/rebuild processes.

    Another forum user recommended changing the dir_mode and file_mode values in /include/utils.php. (KUSKE in this posting - http://www.sugarcrm.com/forums/showt...g_override.php).

    I then made the values in config.php and utils.php match and now everything works fine, surviving any repair/rebuild processes.

    A few confusing items along the way:
    1. the values in the config.php are decimal
    2. the values in the utils.php are octal
    3. it is not clear when to use (for instance) 02777 versus 0777 (and their corresponding decimal versions)

    I hope this is helpful to other users. If there is some more science behind matching these values, especially some information on confusing point #3, I would appreciate any help.

    There seems to be a lot of grief associated with permissions issues and forum users always point to the directory rights WIKI entry as the solution. It is not a complete solution though. So if you agree with the conclusions, some instructions about modifying the config.php and /include/utils.php should be added to the WIKI entry referenced above.

    Thanks,

    Brian

  3. #3
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default Re: SugarCRM and Permissions

    That section of include/Utils.php should only be run in you delete your config.php. Those values are only used to create a new config.php so I am unsure why they would have any bering once the config.php is created.
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

  4. #4
    brian.goodman is offline Member
    Join Date
    Mar 2009
    Posts
    11

    Default Re: SugarCRM and Permissions

    Kevin,

    I will try it again this time leaving the utils.php as default, and matching the permissions in the config.php file with the permissions applied on the cache, custom, data, modules files and directories as per the wiki referenced above. I think the missing link in the wiki is that the permissions applied on those files and directories must match the file_mode and dir_mode permissions in config.php

    Regards,

    Brian
    Last edited by brian.goodman; 2009-07-10 at 01:41 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. permissions on your SugarCRM Directory
    By Katzp02 in forum Help
    Replies: 1
    Last Post: 2008-05-05, 04:35 PM
  2. Help with permissions
    By crsoftware in forum Help
    Replies: 2
    Last Post: 2007-11-08, 03:02 PM
  3. SugarCRM cache permissions
    By theono1 in forum Installation and Upgrade Help
    Replies: 0
    Last Post: 2007-09-18, 09:11 PM
  4. permissions on SugarCRM directory
    By craigfeuerherdt in forum Help
    Replies: 0
    Last Post: 2006-09-28, 11:18 PM
  5. Setting file permissions to make SugarCRM work
    By AltTab in forum General Discussion
    Replies: 2
    Last Post: 2005-08-25, 12:17 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •