Results 1 to 4 of 4

Thread: Clarification of default_permissions

  1. #1
    seade is offline Sugar Community Member
    Join Date
    Dec 2004
    Posts
    77

    Default Clarification of default_permissions

    config.php defines default_permissions which as far as I understand it should control the file ownership and permissions on Linux.

    If possible I would like to be able to have the files owned by my user rather than apache so I have this:
    PHP Code:
      'default_permissions' =>
      array (
        
    'dir_mode' => 1528,
        
    'file_mode' => 432,
        
    'user' => 'myuser',
        
    'group' => 'apache',
      ), 
    With the above setting I would expect any new files and directories to be owned by my user but with apache being able to write files. It seems however that this is not the case. If I attempt to upgrade my 5.1CE to 5.1aCE I get:
    Code:
    Specified directory '' for zip file '/home/myuser/public_html/sugarcrm/cache/upload/SugarCE-Patch-5.1.0a.zip' extraction does not exist.
    and if list the files in the upload directory:
    Code:
    -rw------- 1 apache apache 1593257 Oct  7 13:23 cache/upload/SugarCE-Patch-5.1.0a.zip
    See how the owner is still apache and the group does not have rw.

    So I guess default_permissions doesn't work the way I imagined it might. Is there a way to get this working or will I just have do go back to having the files owned by apache?

    Thanks,

    Scott

  2. #2
    seade is offline Sugar Community Member
    Join Date
    Dec 2004
    Posts
    77

    Default Re: Clarification of default_permissions

    Does anyone know how this is supposed to work?

  3. #3
    roblaus's Avatar
    roblaus is offline Sugar Community Member
    Join Date
    Dec 2006
    Location
    Vienna / Austria
    Posts
    2,850

    Default Re: Clarification of default_permissions

    The above mentioned permissions don't have anything to do with it. There was a bug in 5 (or 5.1RC - not sure) that caused this error. But this should have been fixed already. PLease make sure that you really upgrade from 5.1GA to 5.1a.
    If this is the case I am afraid I have no clue. You may also search the forum for this exact error.
    __________________________
    Robert Laussegger
    http://www.iscongroup.net

    Bei Fragen: support@iscon.at
    Die deutschen Sprachdateien für SugarCRM und das deutsche Handbuch gibt es hier: http://goo.gl/kPsAz
    Ab sofort auch mit 6.4.2

  4. #4
    seade is offline Sugar Community Member
    Join Date
    Dec 2004
    Posts
    77

    Default Re: Clarification of default_permissions

    Quote Originally Posted by seade
    If possible I would like to be able to have the files owned by my user rather than apache so I have this:
    PHP Code:
      'default_permissions' =>
      array (
        
    'dir_mode' => 1528,
        
    'file_mode' => 432,
        
    'user' => 'myuser',
        
    'group' => 'apache',
      ), 
    The above was actually the source of the error for me. I had
    PHP Code:
      'default_permissions' =>
      array (
        
    'dir_mode' => 1528,
        
    'file_mode' => 432,
        
    'user' => 'apache',
        
    'group' => 'users',
      ), 
    but of course the user apache is not allowed to chgrp to the users group. I am now running with this:
    PHP Code:
      'default_permissions' =>
      array (
        
    'dir_mode' => 1528,
        
    'file_mode' => 432,
        
    'user' => 'apache',
        
    'group' => 'apache',
      ), 
    and can upgrade my system. The error message was totally useless. What was actually happening was that sugar was attempting to create a temporary directory. When it did so it was attempting to chgrp to the users group and this operation failed. Instead of outputting something useful the relevant function simply returns false and the net result is that the path becomes the empty string that appears in the error message.

    So what is the point of these configuration parameters when most web servers are locked down in this way.

    They don't seem to make any difference and we still need sudo access to access any files that are created by sugar.

    Scott

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need a Pro's clarification,.. Guru's needed!
    By HomeTeam in forum General Discussion
    Replies: 6
    Last Post: 2007-02-27, 08:17 PM
  2. Clarification about Sugar Pro 4.5.1 Beta Version
    By ramji123 in forum Installation and Upgrade Help
    Replies: 0
    Last Post: 2006-12-25, 08:16 AM
  3. Replies: 0
    Last Post: 2006-03-02, 03:37 PM
  4. Clarification on Installation
    By Tinkerkel in forum Help
    Replies: 0
    Last Post: 2005-03-17, 02:51 AM

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
  •