I’m a bit behind on doing my upgrades but decided to upgrade from 7.1.4 to 7.1.5 today. I’ve been running Suite for nearly a year and had no problems with updates so far. I don’t have any customizations.
When I ran the upgradeWizard, it stops at the System Check.
Apparently the log files have the wrong permissions. As I don’t touch these other than to occasionally look from the GUI, I’m curious to understand how they could change permissions.
Every log file is listed:
File Name Permissions Owner Group
/var/www/sugarcrm/sugarcrm_12_31_14.log 0644 root root
The upgradeWizard.log shows:
Wed, 11 Feb 2015 13:10:18 -0500 [UpgradeWizard] - File [/var/www/sugarcrm/sugarcrm_12_31_14.log] not writable - saving for display
What should the permissions be? I thought 0644 was correct for all the other files other than those specifically listed in the install info.
Is the owner & group wrong? If so, how would Suite create and write to the logs everyday?
Yes I found that in the installation guide. But all files should be 644 and in my case owned & group www-data. Funny thing but all the SuiteCRM created logs are owned by root / root.
Shouldn’t SuiteCRM create the logs with the correct default permissions, owner & group?
Interestingly my installation using Debian Wheezy still has log permission file problems. Today I updated to 7.3 from 7.2.2 and all the created log files have the wrong permissions. they are 0644 root root
Since my SuiteCRM is using Apache2 and all other files created or used are www-data:www-data , why would the log files be created with incorrect user and group?
I presume that SuiteCRM is creating the log files but I’m a newbie so don’t know for sure???
Any suggestions on what I should update or fix would be appreciated.
That looks like many of the same errors that I have gotten when I did the upgrade.
My suggestion is to go to the page in the wiki that shows how to set the preferences for your type of install and then change them back. That means using CHMOD, CHGRP, CHOWN if you’re on Linux.
I think the files with permission 655 should be 664 to work properly.
You should check who the owner is supposed to be too. If you’re using Debian, then the user:group should be www-data not root. I’m not sure about Centos or Redhat but I suspect they are not root. I see you have both root:root and developer:root which I think are a problem.
If you’re using Debian Linux this script may help you. Please check it for your Linux. I used it on the older 6.5.x series but not on the 7.x series. So be careful.
# make sure owner and group is correct for apache2 on Debian
chown -R www-data /var/www/sugarcrm/*
chgrp -R www-data /var/www/sugarcrm/*
# reset all files and directories to minimum required for security
find /var/www/sugarcrm/ -type f -print0 | xargs -0 chmod 644
find /var/www/sugarcrm/ -type d -print0 | xargs -0 chmod 755
# now fix specific permissions for sugarcrm
# fix file permissions for config and log files
chmod 664 config.php config_override.php sugarcrm.log
# fix directory and file permissions for cache custom data and modules directories
find /var/www/sugarcrm/cache -type d -print0 | xargs -0 chmod 2775
find /var/www/sugarcrm/cache -type f -print0 | xargs -0 chmod 664
find /var/www/sugarcrm/custom -type d -print0 | xargs -0 chmod 2775
find /var/www/sugarcrm/custom -type f -print0 | xargs -0 chmod 664
find /var/www/sugarcrm/data -type d -print0 | xargs -0 chmod 2775
find /var/www/sugarcrm/data -type f -print0 | xargs -0 chmod 664
find /var/www/sugarcrm/modules -type d -print0 | xargs -0 chmod 2775
find /var/www/sugarcrm/modules -type f -print0 | xargs -0 chmod 664
I used this script after I had completely messed up the permissions after a failed update. It checks every file and directory in the /var/www/suitecrm|sugarcrm/ and fixes the permissions.
Again this was for the 6.5.x series. I’m not 100% sure it is exactly right for the 7.x series.
I have taken the backup of Complete Custom directory and i tried upgradation.Then Upgraded Success fully.
After that i moved the custom content which i took backup to the upgraded instance.Then i did Repair & Rebuild.The Instance is working fine.