Magento log file permission issues -


i have standard magento application actions performed either through web (www-data) or cron scripts (executed cron user). default, magento creates log files chmod 0640 gives problem. whoever logs exception/system first (www-data or cron), other won't able append. if exception occurs on web, var/log/exception.log created www-data owner cron scripts won't able log exceptions in same file (cron , www-data not in same group if be, wouldn't help).

possible solutions: 1. run cron same www-data user (sysadmin won't budge, doesn't agree solution) 2. change mage.php generate log files more suitable chmod (even 777 maybe). doable means modifying magento core files (mage.php) , it's not allowed license.

mage class final , noticed there no pre- or post- events after logging in order possible change chmod in pre/post hook.

has encountered same problem or has advice on how handle this?

your proposed first solution sounds valid 1 me. cronjob should run www-data user. can guarantee file permissions match, regardless if web server or cron job.

otherwise how can guarantee running cronjob different user web server give same result?

modifying mage.php not right solution stated. never modify core files directly going run problems when updating magento - e. g. overwriting files.


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -