AnsweredAssumed Answered

File permissions changed owership to root

Question asked by sonesay inthavong on Jun 23, 2014
Latest reply on Jun 23, 2014 by Jeff Bickart
I have a very strange problem. I have a perfectly working instance of sugarcrm professional running and versioned under git. I have not setup any routines to perfom on the source code other then what is required by SugarCRM to run cron jobs.  I have set this under root.

# SugarCRM jobs
* * * * * cd /var/www/html/test.sugarpro.ib4t.co; php -f cron.php > /dev/null 2>&1

Every now and then I somehow get file permissions in my source code changed to root and the application fails.



 Firebug log
------------------------------
GET http://test.sugarpro.ib4t.co/cache/api/metadata/lang_en_us_base_ordered.json?v=1403565081
500 Internal Server Error

1.27sjquery.min.js (line 4)
"NetworkError:
  500 Internal Server Error -
http://test.sugarpro.ib4t.co/cache/api/metadata/lang_en_us_base_ordered.json?v=1403565081";
lang_e...3565081


FATAL[2014-6-23
  23:31:54]: TypeError: error.payload is undefined at
http://test.sugarpro.ib4t.co/cache/include/javascript/sugar_sidecar.min.js?v=3gWc0sRH1Xq5WIFCTNMz4g
  on line 586

console.error(message);


logger.js (line 122)


TypeError: error.payload is undefined

...lidationError;app.error.handleValidationError=function(error){var layout=app.con...


sugar_...CTNMz4g (line 586)



Apache Logs
---------------------------------------------------------------------------------------------------------

[Tue Jun 24 11:41:01 2014] [error] [client 10.92.40.128] PHP Warning:  include(/var/www/html/test.sugarpro.ib4t.co/cache/modules/EmailAddresses/EmailAddressvardefs.php): failed to open stream: Permission denied in /var/www/html/test.sugarpro.ib4t.co/metadata/email_addressesMetaData.php on line 95, referer: http://test.sugarpro.ib4t.co/
[Tue Jun 24 11:41:01 2014] [error] [client 10.92.40.128] PHP Warning:  include(): Failed opening 'cache/modules/EmailAddresses/EmailAddressvardefs.php' for inclusion (include_path='/var/www/html/test.sugarpro.ib4t.co:/var/www/html/test.sugarpro.ib4t.co/vendor:.:/usr/share/pear:/usr/share/php') in /var/www/html/test.sugarpro.ib4t.co/metadata/email_addressesMetaData.php on line 95, referer: http://test.sugarpro.ib4t.co/
[Tue Jun 24 11:41:02 2014] [error] [client 10.92.40.128] PHP Warning:  include(/var/www/html/test.sugarpro.ib4t.co/cache/modules/EmailAddresses/EmailAddressvardefs.php): failed to open stream: Permission denied in /var/www/html/test.sugarpro.ib4t.co/metadata/email_addressesMetaData.php on line 95, referer: http://test.sugarpro.ib4t.co/
[Tue Jun 24 11:41:02 2014] [error] [client 10.92.40.128] PHP Warning:  include(): Failed opening 'cache/modules/EmailAddresses/EmailAddressvardefs.php' for inclusion (include_path='/var/www/html/test.sugarpro.ib4t.co:/var/www/html/test.sugarpro.ib4t.co/vendor:.:/usr/share/pear:/usr/share/php') in /var/www/html/test.sugarpro.ib4t.co/metadata/email_addressesMetaData.php on line 95, referer: http://test.sugarpro.ib4t.co/
[Tue Jun 24 11:41:02 2014] [error] [client 10.92.40.128] PHP Warning:  include(/var/www/html/test.sugarpro.ib4t.co/cache/modules/EmailAddresses/EmailAddressvardefs.php): failed to open stream: Permission denied in /var/www/html/test.sugarpro.ib4t.co/metadata/email_addressesMetaData.php on line 95, referer: http://test.sugarpro.ib4t.co/
[Tue Jun 24 11:41:02 2014] [error] [client 10.92.40.128] PHP Warning:  include(): Failed opening 'cache/modules/EmailAddresses/EmailAddressvardefs.php' for inclusion (include_path='/var/www/html/test.sugarpro.ib4t.co:/var/www/html/test.sugarpro.ib4t.co/vendor:.:/usr/share/pear:/usr/share/php') in /var/www/html/test.sugarpro.ib4t.co/metadata/email_addressesMetaData.php on line 95, referer: http://test.sugarpro.ib4t.co/
[Tue Jun 24 11:41:02 2014] [error] [client 10.92.40.128] PHP Warning:  require(/var/www/html/test.sugarpro.ib4t.co/cache/modules/WorkFlow/language/en_us.lang.php): failed to open stream: Permission denied in /var/www/html/test.sugarpro.ib4t.co/include/SugarObjects/LanguageManager.php on line 257, referer: http://test.sugarpro.ib4t.co/
[Tue Jun 24 11:41:02 2014] [error] [client 10.92.40.128] PHP Fatal error:  require(): Failed opening required 'cache/modules/WorkFlow/language/en_us.lang.php' (include_path='/var/www/html/test.sugarpro.ib4t.co:/var/www/html/test.sugarpro.ib4t.co/vendor:.:/usr/share/pear:/usr/share/php') in /var/www/html/test.sugarpro.ib4t.co/include/SugarObjects/LanguageManager.php on line 257, referer: http://test.sugarpro.ib4t.co/
sone@test.sugarcrm.ib4t.co[]
> $ ll /var/www/html/test.sugarpro.ib4t.co/cache/modules/WorkFlow/language/en_us.lang.php
-rw-rw---- 1 root root 3.4K Jun 24 11:12 /var/www/html/test.sugarpro.ib4t.co/cache/modules/WorkFlow/language/en_us.lang.php



Any Ideas what is going on? Am I not suppose to set the cron job under root? It wasnt clear to me at the start of the installation what account to use for cron.



Outcomes