7.1.5 upgrade fails at System check - permissions problem with log files??

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?

Thanks in advance.

Check the installation guide … some files/directories require 755/775 … 644 is too restrictive … this is likely to be your problem

1 Like

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.

BTW the 0644 wasn’t an issue.

So I was about to do the 7.3.1 update from 7.3 today. Low and behold, the same type of files have wrong permissions and owners.

Is this a bug or something in my config?

Any thoughts and suggestions would be appreciated.

Can u please help me on this,I also have the same issue.

Thanks & Regards,

Manasa.

Could you provide the error message and list of files that cause the error?

while in system check it self,I am getting bad permission files,I have gave full permissions to the instance and i tried,then the got these errors,
file permissions onwer group
/suitecrm/cache/modules/Uservardefs.php 0655 root root
/suitecrm/cache/modules/Taskvardefs.php 0655 root root
/suitecrm/cache/modules/Tasks/Taskvardefs.php 0655 root root
/suitecrm/cache/modules/Prospectvardefs.php 0655 root root
/suitecrm/cache/modules/Prospects/Prospectvardefs.php 0655 root root
/suitecrm/cache/modules/Projectvardefs.php 0655 root root
/suitecrm/cache/modules/Project/Projectvardefs.php 0655 root root
/suitecrm/cache/modules/Opportunityvardefs.php 0655 root root
/suitecrm/cache/modules/Opportunities/Opportunityvardefs.php 0655 root root
/suitecrm/cache/modules/Notevardefs.php 0655 root root
/suitecrm/cache/modules/Meetingvardefs.php 0655 root root
/suitecrm/cache/modules/Meetings/Meetingvardefs.php 0655 root root
/suitecrm/cache/modules/Leadvardefs.php 0655 root root
/suitecrm/cache/modules/Leads/Leadvardefs.php 0655 root root
/suitecrm/cache/modules/Employees/Employeevardefs.php 0655 root root
/suitecrm/cache/modules/Contactvardefs.php 0655 root root
/suitecrm/cache/modules/Contacts/Contactvardefs.php 0655 root root
/suitecrm/cache/modules/Casevardefs.php 0655 root root
/suitecrm/cache/modules/Callvardefs.php 0655 root root
/suitecrm/cache/modules/Calls/Callvardefs.php 0655 root root
/suitecrm/cache/modules/Accountvardefs.php 0655 root root
/suitecrm/cache/modules/Accounts/Accountvardefs.php 0655 root root

And i also tried my giving the permissions like this
sudo chmod -R 775 cache custom modules themes data upload config_override.php

then also i got the errors like this …
filename permissions owner group
/suitecrm/upload 0775 developer root
/suitecrm/themes/default/less/wells.less 0775 developer root
/suitecrm/themes/default/less/variables.less 0775 developer root
/suitecrm/themes/default/less/utilities.less 0775 developer root
/suitecrm/themes/default/less/type.less 0775 developer root
/suitecrm/themes/default/less/tooltip.less 0775 developer root
/suitecrm/themes/default/less/thumbnails.less 0775 developer root
/suitecrm/themes/default/less/tables.less 0775 developer root
/suitecrm/themes/default/less/sugarmobile.less 0775 developer root
/suitecrm/themes/default/less/sugar.less 0775 developer root
/suitecrm/themes/default/less/sprites.less 0775 developer root
/suitecrm/themes/default/less/scaffolding.less 0775 developer root
/suitecrm/themes/default/less/responsive.less 0775 developer root
/suitecrm/themes/default/less/reset.less 0775 developer root
/suitecrm/themes/default/less/progress-bars.less 0775 developer root
/suitecrm/themes/default/less/popovers.less 0775 developer root
/suitecrm/themes/default/less/pagination.less 0775 developer root
/suitecrm/themes/default/less/pager.less 0775 developer root
/suitecrm/themes/default/less/navs.less 0775 developer root
/suitecrm/themes/default/less/navbar.less 0775 developer root
/suitecrm/themes/default/less/modals.less 0775 developer root
/suitecrm/themes/default/less/mixins.less 0775 developer root
/suitecrm/themes/default/less/layouts.less 0775 developer root
/suitecrm/themes/default/less/labels.less 0775 developer root
/suitecrm/themes/default/less/hero-unit.less 0775 developer root
/suitecrm/themes/default/less/grid.less 0775 developer root
/suitecrm/themes/default/less/forms.less 0775 developer root
/suitecrm/themes/default/less/font-awesome.less 0775 developer root
/suitecrm/themes/default/less/dropdowns.less 0775 developer root

like this so many errors,ii got .Can u please help me on this.

Thanks & Regards,
Manasa.

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.

You will find that info on page https://suitecrm.com/wiki/index.php/Installation at the “Copying SuiteCRM files to web server” section.

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.

Hi,

Mine is Nginx server,can u tell me what should be default User and Group for the instance.

Thanks & Regards,
Manasa.

Sorry, I have never used Nginx so can’t help you.

You might try Google to search for using Nginx for Suitecrm or Sugarcrm.

Or ask someone in the forums here.

Hi,

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.

Thanks for ur help.

Thanks & Regards,
Manasa.