[Vtigercrm-developers] Ubuntu Server, www-data, crontab and Monolog issue?
Rubén A. Estrada Orozco
rulotec1 at gmail.com
Fri Aug 30 10:25:04 GMT 2024
I use rhel and run the cronjobs with the "apache" user. No problems so far.
On Thu, Aug 29, 2024 at 9:23 AM Joe Bordes <joe at tsolucio.com> wrote:
> Hi
>
> that is a monolog feature :-)
>
> but can you try to just run the cron as www-data, I have been doing that
> for years with no issue at all
>
> * * * * * www-data cd .... /usr/bin/php vtigercron
>
> even if that user does not have shell access that works
>
> give that a try, if it works for you, you avoid having to create another
> user and to do any further investigations
>
>
> On 29/8/24 16:28, Alan Lord wrote:
> > Hi all,
> >
> > Some of you maybe aware that for a while now Ubuntu servers have
> > configured the apache user (www-data) to not have access to a shell.
> >
> > So consequently for a while now, I have usually created a "system"
> > user called vtiger, added it to the www-data group and given that user
> > a shell. I then use this as the user in the crontab. (I don't like
> > running cron jobs as root).
> >
> > Today I noticed something which I never noticed was a problem before
> > the change to Monolog...
> >
> > If I enable the debug log in config.performance.php, the vtiger cron
> > can't run. I see this in my cron log file:
> >
> >> HP Fatal error: Uncaught UnexpectedValueException: The stream or
> >> file "/var/www/html/vtigercrm/logs/vtigercrm.log" could not be opened
> >> in append mode: Failed to open stream: Permission denied
> >
> > The vtigercrm/logs dir is rwxrwxr-x www-data:www-data and my vtiger
> > user is a member of www-data. The vtigercrm.log file however, is
> > created rw-r--r--.
> >
> > So this explains why I can't open the file and I'll find a way to fix
> > that, but, the bigger question for me is that this USED to work before
> > we switched to Monolog without any issue???
> >
> > Secondly - the old vtigercrm.log file was chmod'ed to 200 iirc so you
> > had to be root to read it. Now anyone can read it. Not sure if that is
> > a big deal any more or not but I thought I'd mention it.
> >
> > Cheers
> >
> > Al
> >
> >
> >
> >
> > _______________________________________________
> > http://www.vtiger.com/
>
> --
> Un saludo
> Joe
> TSolucio
>
> JPL TSolució, S.L. garantiza la confidencialidad de los datos que obran en
> su poder y según lo estipulado por la LOPD
> (Ley Orgánica 15/1999 de 13 de diciembre de Protección de Datos de
> Carácter Personal). Este mensaje se dirige
> exclusivamente a su destinatario y puede contener información privilegiada
> o confidencial. Si no es vd. el destinatario
> indicado, queda notificado de que la lectura, utilización, divulgación y/o
> copia sin autorización está prohibida en
> virtud de la legislación vigente. Si ha recibido este mensaje por error,
> le rogamos que nos lo comunique inmediatamente
> por esta misma vía y proceda a su destrucción. El correo electrónico vía
> Internet no permite asegurar la confidencialidad
> de los mensajes que se transmiten ni su integridad o correcta recepción.
> JPL TSolució, S.L. no asume ninguna
> responsabilidad por estas circunstancias.
>
>
> _______________________________________________
> http://www.vtiger.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20240830/6c89ac11/attachment.html>
More information about the vtigercrm-developers
mailing list