Introduction: This is a detailed page of PHP safe mode restriction in effect. It introduces PHP, related knowledge, skills, experience, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 339599 'rolling = 'no'>
When safe_mode is set to on, PHP checks whether the owner of the current script matches the owner of the file to be operated through the file function or its directory. Example:-RW-r -- 1 Rasmus 33 Jul 1 19: 20 script. php
-RW-r -- 1 Root 1116 May 26/etc/passwd
Run script. php <? PHP
Readfile ('/etc/passwd ');
?>
If the security mode is activated, the following error occurs: Warning: Safe mode restriction in effect. The script whose uid is 500 is not
Allowed to access/etc/passwd owned by UID 0 in/docroot/script. php on line 2
Haohappy statement:
The reason is that you use the safe mode, and the UID of the user you upload the file is different from the UID of the owner, resulting in no access permission. For example, in safe mode, the UID of your FTP upload user is 123, and the UID of the uploaded owner is 456.
There are two solutions:
1. Disable security mode;
2. Change the owner of the file/directory in chown on the command line.
Of course, both methods require you to have server permissions.
Love J2EE follow Java Michael Jackson video station JSON online tools
Http://biancheng.dnbcw.info/php/339599.html pageno: 7.