Please describe the effect on PHP system functions after Safe_mode is turned on in PHP. ini

Source: Internet
Author: User

After opening, it will mainly affect the system operation, file, permission settings and other methods, the usual projects are basically not used in these methods. I think I should use it to deal with Webshell, and reduce some of the safety problems brought by people implanted Webshell.

————

Webshell is a kind of command execution environment which exists in the form of ASP, PHP, JSP or CGI, or it can be called as a kind of web backdoor. Hackers in the invasion of a website, usually the ASP or PHP backdoor files with the Web site Server web directory normal Web page files mixed together, and then you can use the browser to access the ASP or PHP back door, a command execution environment to achieve the purpose of controlling the Web server.

————

Safe_mode is a shared environment that provides a basic security. On a multi-user shared Phpweb server, when this server has the Safe_mode mode enabled, the following functions will be affected.

First, the function that attempts to access the file system will be limited, the user ID of the server running, and if you want to attempt to manipulate a file, you must read or write access to the file.

Therefore, the following functions will receive a limit when Safe_mode is turned on:

Ckdir,

Move_uploaded_file,

Chgrp

Parse_ini_file,

Chown

RmDir

Copy

Rename

fopen

Require

Highlight_file,

Show_source,

Include,symlink,

Link

Touch

Mkdir

Unlink

All of these are functions related to the operation of the file system , in addition, some PHP extension functions will be limited, can not be directly loaded in the program extension, only to php.ini, and PHP if you need to execute the operating system program, must be in Safe_mode_ Specifies the path to the program in Exec_dir, otherwise execution will fail.

In addition, there are

Exec

Shell_exec,

Pasathru,

System

Popen and other functions will receive a limit

http://blog.csdn.net/zqtsx/article/details/9052233

Please describe the effect on PHP system functions after Safe_mode is turned on in PHP. ini

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.