<div dir="auto">I use virtualmin on Ubuntu, that create domain (<a href="http://crm.mycompany.it">crm.mycompany.it</a>), user (mycompany) with right permission: user can access to /home/mycompany/public_html, execute Cron and shell script with limited permissions and vtiger work well <div dir="auto"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il ven 30 ago 2024, 12:31 Rubén A. Estrada Orozco <<a href="mailto:rulotec1@gmail.com">rulotec1@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I use rhel and run the cronjobs with the "apache" user. No problems so far.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 29, 2024 at 9:23 AM Joe Bordes <<a href="mailto:joe@tsolucio.com" target="_blank" rel="noreferrer">joe@tsolucio.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi<br>
<br>
that is a monolog feature :-)<br>
<br>
but can you try to just run the cron as www-data, I have been doing that <br>
for years with no issue at all<br>
<br>
* * * * * www-data cd .... /usr/bin/php vtigercron<br>
<br>
even if that user does not have shell access that works<br>
<br>
give that a try, if it works for you, you avoid having to create another <br>
user and to do any further investigations<br>
<br>
<br>
On 29/8/24 16:28, Alan Lord wrote:<br>
> Hi all,<br>
><br>
> Some of you maybe aware that for a while now Ubuntu servers have <br>
> configured the apache user (www-data) to not have access to a shell.<br>
><br>
> So consequently for a while now, I have usually created a "system" <br>
> user called vtiger, added it to the www-data group and given that user <br>
> a shell. I then use this as the user in the crontab. (I don't like <br>
> running cron jobs as root).<br>
><br>
> Today I noticed something which I never noticed was a problem before <br>
> the change to Monolog...<br>
><br>
> If I enable the debug log in config.performance.php, the vtiger cron <br>
> can't run. I see this in my cron log file:<br>
><br>
>> HP Fatal error: Uncaught UnexpectedValueException: The stream or <br>
>> file "/var/www/html/vtigercrm/logs/vtigercrm.log" could not be opened <br>
>> in append mode: Failed to open stream: Permission denied<br>
><br>
> The vtigercrm/logs dir is rwxrwxr-x www-data:www-data and my vtiger <br>
> user is a member of www-data. The vtigercrm.log file however, is <br>
> created rw-r--r--.<br>
><br>
> So this explains why I can't open the file and I'll find a way to fix <br>
> that, but, the bigger question for me is that this USED to work before <br>
> we switched to Monolog without any issue???<br>
><br>
> Secondly - the old vtigercrm.log file was chmod'ed to 200 iirc so you <br>
> had to be root to read it. Now anyone can read it. Not sure if that is <br>
> a big deal any more or not but I thought I'd mention it.<br>
><br>
> Cheers<br>
><br>
> Al<br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> <a href="http://www.vtiger.com/" rel="noreferrer noreferrer" target="_blank">http://www.vtiger.com/</a><br>
<br>
-- <br>
Un saludo<br>
Joe<br>
TSolucio<br>
<br>
JPL TSolució, S.L. garantiza la confidencialidad de los datos que obran en su poder y según lo estipulado por la LOPD<br>
(Ley Orgánica 15/1999 de 13 de diciembre de Protección de Datos de Carácter Personal). Este mensaje se dirige<br>
exclusivamente a su destinatario y puede contener información privilegiada o confidencial. Si no es vd. el destinatario<br>
indicado, queda notificado de que la lectura, utilización, divulgación y/o copia sin autorización está prohibida en<br>
virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente<br>
por esta misma vía y proceda a su destrucción. El correo electrónico vía Internet no permite asegurar la confidencialidad<br>
de los mensajes que se transmiten ni su integridad o correcta recepción. JPL TSolució, S.L. no asume ninguna<br>
responsabilidad por estas circunstancias.<br>
<br>
<br>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote></div>
_______________________________________________<br>
<a href="http://www.vtiger.com/" rel="noreferrer noreferrer" target="_blank">http://www.vtiger.com/</a></blockquote></div>