Page 1 of 1

Warning message : ..scheduled job is not run with the same user account as the webserver

Posted: 19 Mar 2019, 08:07
by simonyeh
Hi, There

What is the root cause to the following message which is shown on my "Manage Configuration Options"?
Now I change my crontab user of EmailReporting from "root" to "apache" , but the message is the same .
-------------------------------------------------------------------------------------------------
Warning: It seems that the scheduled job is not run with the same user account as the webserver / PHP process. This could cause problems with attachments.
The SAPI for the scheduled job is most likely "cli".
The webserver runs under the following user account: apache
-------------------------------------------------------------------------------------------------
Any idea ?
thanks

Re: Warning message : ..scheduled job is not run with the same user account as the webserver

Posted: 19 Mar 2019, 17:37
by SL-Gundam
you are running bug_report_mail.php (EmailReporting command line job) under a different user account then the webserver.

This can be problematic under linux, Windows often has less issues with this.
Linux for example will apply permissions under the user that created the file.
Meaning that EmailReporting will add attachments that you cannot delete properly in MantisBT since MantisBT has no permissions to delete the files

This is not always an issue but could be

Re: Warning message : ..scheduled job is not run with the same user account as the webserver

Posted: 20 Mar 2019, 03:08
by simonyeh
Hi Sir

Base upon your advise , Is it no way to resolve it ? or how to resolve it so that the error message will disappear?
I found that my Mantis can delete the attachment normally so far.

Appreciate if any further advise.

here is my crontab setting
------------------------------------------------------------------------------------------------------------------
*/5 * * * * apache php /var/www/html/mantis/plugins/EmailReporting/scripts/bug_report_mail.php > /tmp/mantis_EmailReporting_bug_report_mail.log
-------------------------------------------------------------------------------------------------------------------

The error message is :
----------------------------------------------------------------------------------------------------------------------
Warning: It seems that the scheduled job is not run with the same user account as the webserver / PHP process. This could cause problems with attachments.
The SAPI for the scheduled job is most likely "cli".
The webserver runs under the following user account: apache
-----------------------------------------------------------------------------------------------------------------------

Re: Warning message : ..scheduled job is not run with the same user account as the webserver

Posted: 20 Mar 2019, 13:59
by SL-Gundam
In your cronjob you can specify the user account under which it must be run. I believe you've done it. The next time the job is run EmailReporting should update the records accordingly

There should actually be some more lines below your copy/paste which specify the current user accounts under which the SAPI modules are running

Ones EmailReporting detects (assuming it detects correctly) that both SAPI modules are running under the same account, the message will disappear