Page 1 of 1

RunTime Exception issues with opening log when opening cases

Posted: Mon Mar 05, 2018 9:55 am
by Throwaway
The stream or file "/opt/processmaker/shared/sites/workflow/log/processmaker-2018-03-05.log" could not be opened: chmod(): Operation not permitted
    At Monolog\Handler\StreamHandler->write() in /opt/processmaker/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php line 88 At Monolog\Handler\RotatingFileHandler->write() in /opt/processmaker/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php line 37 At Monolog\Handler\AbstractProcessingHandler->handle() in /opt/processmaker/vendor/monolog/monolog/src/Monolog/Logger.php line 336 At Monolog\Logger->addRecord() in /opt/processmaker/vendor/monolog/monolog/src/Monolog/Logger.php line 367 At Monolog\Logger->addInfo() in /opt/processmaker/gulliver/system/class.monologProvider.php line 99 At MonologProvider->addLog() in /opt/processmaker/gulliver/system/class.bootstrap.php line 2950 At Bootstrap::registerMonolog() in /opt/processmaker/workflow/engine/methods/cases/cases_Step.php line 230 At require_once() in /opt/processmaker/workflow/public_html/sysGeneric.php line 1038 At include() in /opt/processmaker/workflow/public_html/app.php line 61
Everything worked fine last week and now this error is showing.

Re: RunTime Exception issues with opening log when opening cases

Posted: Mon Mar 05, 2018 5:56 pm
by amosbatto
You get that error if you executed workflow/engine/bin/cron.php or one of the other cron scripts without being the apache user.

You need to change the owner of all the files in your /opt/processmaker/shared directory to your apache user:
su or sudo su -
chown -R apache-user:apache-user /opt/processmaker/shared
Where apache-user:apache-user is "apache:apache" in Red Hat/Cent OS, "www-data:www-data" for Debian/Ubuntu, "wwwrun:www" for SUSE/OpenSUSE or "daemon:daemon" for a Bitnami install in all distributions.

The next time you need to execute one of PM's cron scripts, follow the instructions to execute as the apache user of your distribution:
http://wiki.processmaker.com/3.2/Execut ... p#In_Linux
http://wiki.processmaker.com/3.2/Execut ... nux.2FUNIX

Re: RunTime Exception issues with opening log when opening cases

Posted: Mon Nov 11, 2019 2:45 am
by fiqihpunya
amosbatto wrote: Mon Mar 05, 2018 5:56 pm You get that error if you executed workflow/engine/bin/cron.php or one of the other cron scripts without being the apache user.

You need to change the owner of all the files in your /opt/processmaker/shared directory to your apache user:
su or sudo su -
chown -R apache-user:apache-user /opt/processmaker/shared
Where apache-user:apache-user is "apache:apache" in Red Hat/Cent OS, "www-data:www-data" for Debian/Ubuntu, "wwwrun:www" for SUSE/OpenSUSE or "daemon:daemon" for a Bitnami install in all distributions.

The next time you need to execute one of PM's cron scripts, follow the instructions to execute as the apache user of your distribution:
http://wiki.processmaker.com/3.2/Execut ... p#In_Linux
http://wiki.processmaker.com/3.2/Execut ... nux.2FUNIX
Image

When i try this, i also got that error when i trying to test, is the problem same? (i've got that image from wiki)