<bdo id='ebBZ1'></bdo><ul id='ebBZ1'></ul>

    <small id='ebBZ1'></small><noframes id='ebBZ1'>

  1. <tfoot id='ebBZ1'></tfoot>

  2. <i id='ebBZ1'><tr id='ebBZ1'><dt id='ebBZ1'><q id='ebBZ1'><span id='ebBZ1'><b id='ebBZ1'><form id='ebBZ1'><ins id='ebBZ1'></ins><ul id='ebBZ1'></ul><sub id='ebBZ1'></sub></form><legend id='ebBZ1'></legend><bdo id='ebBZ1'><pre id='ebBZ1'><center id='ebBZ1'></center></pre></bdo></b><th id='ebBZ1'></th></span></q></dt></tr></i><div id='ebBZ1'><tfoot id='ebBZ1'></tfoot><dl id='ebBZ1'><fieldset id='ebBZ1'></fieldset></dl></div>
      <legend id='ebBZ1'><style id='ebBZ1'><dir id='ebBZ1'><q id='ebBZ1'></q></dir></style></legend>

      我可以保护我的 CRON 脚本免受远程用户的攻击吗?

      Can I protect my CRON scripts from remote users?(我可以保护我的 CRON 脚本免受远程用户的攻击吗?)

      • <small id='6HMmk'></small><noframes id='6HMmk'>

            <tbody id='6HMmk'></tbody>

            1. <i id='6HMmk'><tr id='6HMmk'><dt id='6HMmk'><q id='6HMmk'><span id='6HMmk'><b id='6HMmk'><form id='6HMmk'><ins id='6HMmk'></ins><ul id='6HMmk'></ul><sub id='6HMmk'></sub></form><legend id='6HMmk'></legend><bdo id='6HMmk'><pre id='6HMmk'><center id='6HMmk'></center></pre></bdo></b><th id='6HMmk'></th></span></q></dt></tr></i><div id='6HMmk'><tfoot id='6HMmk'></tfoot><dl id='6HMmk'><fieldset id='6HMmk'></fieldset></dl></div>
              • <bdo id='6HMmk'></bdo><ul id='6HMmk'></ul>
              • <legend id='6HMmk'><style id='6HMmk'><dir id='6HMmk'><q id='6HMmk'></q></dir></style></legend>
              • <tfoot id='6HMmk'></tfoot>

                本文介绍了我可以保护我的 CRON 脚本免受远程用户的攻击吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我目前正在开展一个涉及使用 CRON 作业的新项目.

                I am currently working on a new project which involves using CRON jobs.

                CRON 脚本基本上运行 SQL 查询,将数据生成到文件中,然后通过 FTP 将该文件发送到另一台服务器.

                The CRON script basically runs an SQL query, generates the data into a file, and send that file to another server via FTP.

                该脚本位于实时网站 (www.website.com/sendOrders.php) 上

                The script is on a live website (www.website.com/sendOrders.php)

                我没有看到任何安全问题或威胁,而且我认为任何人都不太可能在服务器上找到 PHP 脚本.但是我不希望脚本被任何外人执行.

                I don't see any security issues or threats, and I think it is highly unlikely that anyone will find the PHP script on the server. However I don't want the script to be executed by any outsiders.

                有没有办法保护这个脚本?

                Is there a way I can protect this script?

                谢谢彼得

                推荐答案

                您可以将您的秘密文件"移动到一个子文件夹中,然后创建一个 .htaccess 文件 阻止所有人访问该文件,运行 Cronjob 的服务器除外.

                You could move your "secret files" into a subfolder, then create a .htaccess file in there that prevents access to that file from everyone, except the server that is running the Cronjob.

                示例:

                DENY FROM ALL
                ALLOW FROM 123.123.123.123
                

                如果您有 shell 访问权限,您也可以将脚本放在可访问文件夹之外,并直接通过命令行或 cronjob 运行,如下所示:php script.php.

                If you have shell access you might also put the scripts outside of the accessible folder and run directly via command line or cronjob like this: php script.php.

                这篇关于我可以保护我的 CRON 脚本免受远程用户的攻击吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Is PHP or PHP based web framework stateful or stateless?(PHP 或基于 PHP 的 Web 框架是有状态的还是无状态的?)
                How to parse django style template tags(如何解析 django 样式模板标签)
                What is a good setup for editing PHP in Emacs?(在 Emacs 中编辑 PHP 的好设置是什么?)
                How to check whether specified PID is currently running without invoking ps from PHP?(如何在不从 PHP 调用 ps 的情况下检查指定的 PID 当前是否正在运行?)
                What#39;s the difference between escapeshellarg and escapeshellcmd?(escapeshellarg 和escapeshellcmd 有什么区别?)
                php in background exec() function(php 后台 exec() 函数)

                <tfoot id='xhbmY'></tfoot>

                    <i id='xhbmY'><tr id='xhbmY'><dt id='xhbmY'><q id='xhbmY'><span id='xhbmY'><b id='xhbmY'><form id='xhbmY'><ins id='xhbmY'></ins><ul id='xhbmY'></ul><sub id='xhbmY'></sub></form><legend id='xhbmY'></legend><bdo id='xhbmY'><pre id='xhbmY'><center id='xhbmY'></center></pre></bdo></b><th id='xhbmY'></th></span></q></dt></tr></i><div id='xhbmY'><tfoot id='xhbmY'></tfoot><dl id='xhbmY'><fieldset id='xhbmY'></fieldset></dl></div>
                      • <small id='xhbmY'></small><noframes id='xhbmY'>

                          <tbody id='xhbmY'></tbody>

                      • <legend id='xhbmY'><style id='xhbmY'><dir id='xhbmY'><q id='xhbmY'></q></dir></style></legend>
                          <bdo id='xhbmY'></bdo><ul id='xhbmY'></ul>