Ask questions about installing and configuring ProcessMaker 3
By azalea45
#813794
Hi All,

We having an intermittent issue that the permissions on the log file are under root and not www-data. When that occurs the entire system freezes and non of the users can process cases(see attached screenshot).
Does anyone know a reason for this?
If so, how do stop it from becoming a major issue as this is happening with more and more frequency.

I have a work around and change the file name. The system then creates a new log file and works correctly.

thanks
Attachments
osap error.png
osap error.png (12.23 KiB) Viewed 4266 times
By AlanBueno
#813808
Hello,

A possible cause for this problem is that the folder /log/ that contains the logs might not have the right permissions, could you please run the following commands and attach a screen-shot of the results?
Code: Select all
cd /opt/processmaker/shared/sites/workflow/ 
ls -l 
User avatar
By amosbatto
#813831
The problem is that you have been executed the workflow/engine/bin/*cron.php scripts with a user who is not your Apache user, so it is creating log files that PM can't access when executed by Apache. This is a problem with the new logging feature in PM 3.1.3 and later.

First reset the owner of all your log files to the Apache user like this.
If using CentOS/RHEL, do this:
Code: Select all
chown -R apache:apache {/opt}/processmaker/shared/sites/{workspace}/log
If Debian/Ubuntu:
Code: Select all
chown -R www-data:www-data {/opt}/processmaker/shared/sites/{workspace}/log
If using a Bitnami installation of PM in any version of Linux:
Code: Select all
chown -R daemon:daemon {/opt}/processmaker/shared/sites/{workspace}/log
Then, you need to change how you are executing your cron jobs, so they are executed by your Apache user. Delete your existing cron configuration file that is executing the workflow/engine/bin/*cron.php scripts. Then recreate it the correct way as is explained here:
http://wiki.processmaker.com/3.2/Execut ... p#In_Linux
http://wiki.processmaker.com/3.2/Execut ... nux.2FUNIX
By azalea45
#813908
Dear All,
Thank you for the reply's and they gave us an fantastic starting point.

Our current cronjob executing under root is
Code: Select all
*/30 * * * * php -f /opt/processmaker/workflow/engine/bin/cron.php +wworkflow +force
a much simpler solution is to run the cronjob under the www-data user with this command
Code: Select all
sudo crontab -u www-data -e
The only downside is that the log gets written to the normal system log (in /var/log) and not to the processmaker log file (/opt/processmaker/sites/log). We used the following command to overcome this
Code: Select all
sudo chown www-data:www-data cron.log
Want to create your own meme coin?

In the world of cryptocurrencies, a unique and exc[…]

The market for cryptocurrencies is demonstrating a[…]

What's SAP FICO?

Embarking on a dissertation can be one of the most[…]

Hello. For rental housing, there are software solu[…]