简体   繁体   English

PHP计划任务安全性

[英]PHP Scheduled Task Security

To piggyback off of this article, How to schedule the execution of a PHP script on the server side? 作为本文的附带内容, 如何安排服务器端PHP脚本的执行? , what concerns should I have for the user account that is selected to run the script? ,我对选择运行脚本的用户帐户有什么担忧?

For example, if I use the administrator account and I need to change the password of the administrator account, what happens to my scripts? 例如,如果我使用管理员帐户,而我需要更改管理员帐户的密码,我的脚本会怎样? Is there a way to have the scripts run on Windows and not have to worry about user account password changes? 有没有一种方法可以让脚本在Windows上运行,而不必担心用户帐户密码更改? Are there other security concerns by running PHP scripts in this manner that I need to be aware of? 通过这种方式运行PHP脚本是否还有其他我需要注意的安全问题?

Is there a way to make it run on the local system without needing to be an admin user and call php? 有没有一种方法可以使其在本地系统上运行而无需成为管理员用户并调用php?

Typically scheduled tasks with work if a password is updated, as it links into the user account. 通常,如果密码已链接到用户帐户,则计划的工作可以正常工作。

However, its not a good idea to create tasks under random users, rule of thumb is typically organize / create users specifically for a scheduled task. 但是,在随机用户下创建任务并不是一个好主意,经验法则通常是专门为计划任务组织/创建用户。 I know internally for domain accounts, we (at my company) have specific accounts that we use for backups, others for scheduled tasks, etc. 我内部知道域帐户,我们(在我公司)有用于备份的特定帐户,用于计划任务的其他帐户等。

That way you separate logic and security layer (backup user isn't full admin, nor is a task running user capable of say touching databases, etc;) 这样,您就可以将逻辑层和安全层分开(备份用户不是完全管理员,也不是一个正在运行的任务用户能够说动数据库等等)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM