Skip to content

incorrect(?) assumption on cron execution security #32150

@f1-outsourcing

Description

@f1-outsourcing

The questions that was asked:
"Is it possible to use wget instead of php in cron for Magento 2?"
the answer from adobe:
"I think the answer to the question is straightforward - no, you cannot use wget instead of php in cron in Magento 2. And we are not likely to add this by default due to security ramifications."

Please explain. Because running the code under the website user is in my opinion more secure than as a user account. Php even advices to use disable_functions to disable shell execution. (because that bypasses the openbasedir).
Running the cron job via wget/curl allows for php restrictions to be in place, like limit execution time, like the openbase dir.
The command line does not have that at all. How can that be more secure.

The webuser has been configured and secured to execute website scripts and user/shell accounts are not configured to execute website scripts.

I would flag this issue as high. Because if this assumption is indeed incorrect, you have implemented exactly the opposite, and chosen the less secure implementation.

https://community.magento.com/t5/Just-Ask-Alan/Is-it-possible-to-use-wget-instead-of-php-in-cron-for-Magento-2/m-p/25418/highlight/true#M155

https://community.magento.com/t5/Installing-Magento-2-x/Is-it-possible-to-use-wget-instead-of-php-in-cron-for-Magento-2/m-p/468515#M9476

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue: needs updateAdditional information is require, waiting for responseSeverity: S4Affects aesthetics, professional look and feel, “quality” or “usability”.non-issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions