2

I noticed that the nginx processes have two different users: root is the user which runs the master process, and nobody is the default one for workers.

To which user must I place the cron job ? I believe it's the one who runs the workers.

Thank you.

1 Answer 1

2

I'd rather gnaw my hand off than run anything from cron with root privileges. Run Magento cron script as nobody. Besides, you're executing command line PHP, not nginx.

4
  • webguys.de/magento/tuerchen-08-magento-cron-demystified says cron must run as webserver user. Thanks for the reply.
    – Niloct
    Commented Jun 7, 2014 at 17:04
  • The reason being that whoever has an access to cron.php / cron.sh file has automatically those privileges those scripts were ran as. Run them as a root and you have a security hole as big as Pacific ocean (minus water).
    – Pronto
    Commented Jun 7, 2014 at 18:49
  • I understand. My comment was due to you pointed that I was not executing nginx, but php scripts. So I wanted to clarify the instructions at that link.
    – Niloct
    Commented Jun 8, 2014 at 1:14
  • :) cron is a very important part of magento and at the same time too often overlooked / misunderstood. It's good that people write about it.
    – Pronto
    Commented Jun 8, 2014 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.