[Vtigercrm-developers] Ubuntu Server, www-data, crontab and Monolog issue?
Alan Lord
alanslists at gmail.com
Thu Aug 29 14:28:10 GMT 2024
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
More information about the vtigercrm-developers
mailing list