Results 1 to 9 of 9

Thread: Error after Sugar 5.2.0 Install - PIC

  1. #1
    Geared is offline Member
    Join Date
    Jan 2009
    Posts
    7

    Exclamation Error after Sugar 5.2.0 Install - PIC

    Hello Sugar Community,

    I have just installed Sugar 5.2.0 Full on my web server. I had difficulties installing Sugar, it took me the 3rd try to get to the point where I can log into the CRM. Now that I am able to log into the CRM I receive a MySQL database error. I took a screen shot that you can take a look at below, but the error repeats itself a few times with almost any action I take in SugarCRM. The error is as follows:

    "Warning: chmod() [function.chmod]: Operation not permitted in /mnt/w0602/d07/s13/b02fb8df/www/geared.ca/SugarCE-Full-5.2.0/include/utils/sugar_file_utils.php on line 196"

    I did check if this was related to permission by giving this one file permissions of 775. I retried to setting up SugarCRM and that is when I got this error.

    -----------------------------------------------------------------

    I will give you a bit of details on what kind of server I am running.

    » Operating system type and version FreeBSD 4.10
    » Sugar version and edition 5.2.0 Community Edition
    » Webserver type and version Apache/2.2.6
    » PHP version PHP 5
    » MySQL server version MySQL 5.0.24a & phpMyAdmin 2.4.0

    -----------------------------------------------------------------

    The first few attempts I made, I had difficulties setting up the Database correctly, and the file permissions. What I did was create a new database with a description of Sugarcrm, and used the auto generated database name, user name, and password to fill in the requirement in the setup. For the permissions, I set all folders and subfolders/files to 775, and the config.php to 664.

    The screen shot is below, sorry for the size. I was afraid if I made it smaller the text would not show up clearly.
    Thanks for taking a look.



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

    Default Re: Error after Sugar 5.2.0 Install - PIC

    You'll find this error (and its resolution) mentioned here quite often.
    Change (chown) the owner of your Sugar directory recursively to your webserver user (www-data, nouser...), that should get rid of the problem.
    __________________________
    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

  3. #3
    Geared is offline Member
    Join Date
    Jan 2009
    Posts
    7

    Default Re: Error after Sugar 5.2.0 Install - PIC

    Thank you Roblaus for your reply,

    Would you be able to explain your answer in a bit more depth?
    I am hosting my web server with Netfirms and I don't have access to a command line. How would I be able to resolve this without the command line?
    Is it the apache user name that I am changing?

    Thanks again,

  4. #4
    petecorbs is offline Senior Member
    Join Date
    Dec 2008
    Posts
    24

    Default Re: Error after Sugar 5.2.0 Install - PIC

    Hi Im a newbie to Sugar aswell and have been having terrible problems setting up my system and all of them are related to the same problem you are having.

    I have posted several requests for help on these forums but without reply so i have resigned myself to solving the problem myself. Your post has actaully brought something to light that i hadnt realised which was setting the chown of the folder sugar resides in.

    This is clearly a massive part of the pre installation however it is not mentioned anywhere it is just presumed that everyone would know this (i am no server administrator so i had no idea myself).

    What i have done, as i to do not have access to the command line) is to email my hosting company (All about hosting) ask them to create a directory called crm on my server and to run the chown command so the folder has permission to write read and execute itself, my admin guy did this within a few mins and emailled me back with the folder in place i will be back in the office on Monday (5th of Jan) to upload the sugar files and try again.

    My issues were not the same as yours mine were related to inbound email but basically i couldnt collect any email coz the permissions of the folder wouldnt allow some of the scripts to run properly and collect my mail.

    I would suggest to Sugar they address this issue as it is rather imnportant during set up that the correct permissions of the sugar directly are set up correctly before starting or nothing will work.

    Personally i would like to thank you for your post (you were lucky to get a reply, all beit brief and without any detail of how to perform such commands). I was about to give up and bin Sugar but now ill try one more timne with the permissions set properly.

    Thanks

  5. #5
    Geared is offline Member
    Join Date
    Jan 2009
    Posts
    7

    Default Re: Error after Sugar 5.2.0 Install - PIC

    Well your welcome and thank you for your input petecorbs,

    I wish I had an administrator that got back to me that fast with my hosting provider. I had sent an email late this morning at the same time as posting to try my sugar directory "chown".

    You are saying that this step needs to be done before installation? If that is so, then I will need to reinstall my Sugar. Are you using v5.2.0? What is "chown" in the first place? I am not an administrator either and am not familiar with these terms and commands. Is it a permissions command? The way I see chown being used in these forums, it seems like a different type of permissions level allowing only certian users access to whatever pending permissions the folders have tied to them. Is this right?

    Well thanks for your post again, and your post is helping me understand more about this problem as well.

    Thank you,
    Geared

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

    Default Re: Error after Sugar 5.2.0 Install - PIC

    OK, to shed some light on these issues (I am not a Linux pro but I did set up quite a few systems during the past couple of months):

    chown essentailly means nothing else then change ownership. Under ix each file/folder is owned by a user and a group. For Sugar it is recommended (as for almost all web applications) that only the user who runs the web server has access to the files iin the Sugar directories. It is clear why: For security reasons this user cannot log in (this is explicitely forbidden) and all operations (with the exception of maintenance that you do as a superuser) are to be carried out through the web interface and thus through this user from inside the system.

    Now if a particular drectory/file does have another user (root, a superuser our yourself in most cases because of the copying/extraction process) it is clear that the web server (=user of it) cannot access this particular directory/file because usually permissions go top down. Hence the system throws errors.

    Now the folder is owned by somebody (the web server user) but still it needs to be defined what this user can do. This is also simple: he can list, read or write (and all combinations of it). The same is valid for the owning group and for everybody. What brings us to the so called octal notation:

    Each digit means one of the three permitted groups: So 111 means that owner, group and everybody can LIST only, 2 write only, 4 read only, list & write = 3, list & read = 5, read & write = 6; list, read & write = 7
    So if you see a notation of 700 - this means only the owner has all permissions, nobody else can do anything (there is one more but we forget about this now). 777 then means that everybody can do everything (very bad).

    Another example: 644: the owner can read and write, all others can only read. Please consult the Sugar documentaion in order to see which permissions are needed for which directories.

    My apologies if I made mistakes - please correct me
    __________________________
    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

  7. #7
    Geared is offline Member
    Join Date
    Jan 2009
    Posts
    7

    Default Re: Error after Sugar 5.2.0 Install - PIC

    Thanks again Roblaus for stepping in to help,

    That helped explain a few things, and I contacted my support from my hosting provider and this is what they replied back to me with..

    "The server requires that your files/directories are readable/executable (in the case of a directory) by the group. Thus, if you need to allow permissions for the web server to do something, please set the appropriate "group" permissions. You will not be able to change ownership of the files/directories as this is not permitted at Netfirms."

    Now they disabled the command "chown" so I am not able to change ownership as per the email there. I did change group permissions on my sugar directory but I am receiving the same error. I have reason to believe the problem is the permissions set in their directories that I cannot alter because the error in Sugar starts off in their directories. This is the command I used to give group permissions to my sugar directory, which if it had worked it doesn't look very secure unless there is a way for me to do so.

    "chgrp -R ug+rwx sugarcrm"

    "Warning: chmod() [function.chmod]: Operation not permitted in /mnt/w0602/d07/s13/b02fb8df/www/geared.ca/sugar/include/utils/sugar_file_utils.php on line 196"

    I was trying to look for commands to allow me to see the available user groups and I found a posting in another forum where the client was told by the support to just use permission 777 to fix the problem, and the forum had a good uproar over that advice. Unless I am mistaken it seems like a similar scenario here just not so direct.

    If there are still people willing to help tackle this problem and comment on my finding, I would greatly appreciate it. If the problem is the hosting company not giving out sufficient privileges to their clients then I need to change hosting companies.

    Thanks again Roblaus and Petecorbs for your input.

  8. #8
    Geared is offline Member
    Join Date
    Jan 2009
    Posts
    7

    Default Re: Error after Sugar 5.2.0 Install - PIC

    Hello all,

    So I have been working to put the resolution that has been provided by roblaus to work here, and found out my hosting provider does not allow the chown command to be used to change owners and they will not do it for me either. I have also discovered that the directory Sugar is trying to access is a directory that I have no control over permissions or ownership. It is this directory here, which is listed in the error..

    Warning: chmod() [function.chmod]: Operation not permitted in /mnt/w0602/d07/s13/b02fb8df/www/geared.ca/sugar/include/utils/sugar_file_utils.php on line 196

    So I explained my thoughts to my hosting provider and they have offered me a work around for this problem. They will not help me with this current problem but they are aware of this issue with Sugar and told me that there is a previous version of Sugar that does not need to access this directory that is highlighted above.

    So I have started a new post to get some help identifying the most recent Sugar that does not require this access. I will be installing and trying to find the answer myself in the meantime. I will start with 5.0.0h and work my way down.

    Here is the link to my new post.
    http://www.sugarcrm.com/forums/showthread.php?t=41918


    Thank you all for reading and posting your replys!

  9. #9
    CSeDev is offline Junior Member
    Join Date
    May 2008
    Posts
    3

    Default Re: Error after Sugar 5.2.0 Install - PIC

    Not the ideal solution, but just comment line 196 in your sugar_utils file and you'll be fine.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 5
    Last Post: 2008-02-15, 03:33 AM
  2. Sugar install Error
    By wmcdonald in forum Installation and Upgrade Help
    Replies: 2
    Last Post: 2007-08-05, 05:10 AM
  3. Started Sugar Install,.. getting error screen..
    By HomeTeam in forum Installation and Upgrade Help
    Replies: 17
    Last Post: 2007-02-23, 01:44 PM
  4. Sugar 45 install error with SuSe 10
    By alevene in forum Help
    Replies: 3
    Last Post: 2006-09-15, 01:04 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
  •