PHP SAFE MODE restriction in effect problem
When Safe_mode is set to on,php, the owner of the current script is checked by the file function or its directory to match the owner of the file that will be manipulated. Example:-rw-rw-r--1 Rasmus Rasmus Jul 1 19:20 script.php
-rw-r--r--1 root root 1116 May 18:01/etc/passwd
Run script.php readfile ('/etc/passwd ');
?>
If Safe mode is activated, the following error will be caused: Warning:safe mode restriction in effect. The script whose UID is
Allowed to access/etc/passwd owned by UID 0 in/docroot/script.php on line 2
Haohappy's argument:
The reason is that you use Safe mode, and the user uid of the file you upload and the UID of the owner are different, resulting in no access rights. For example, in Safe mode, your FTP upload user uid is 123, and after uploading the owner's UID is 456, this error will occur.
There are two ways to resolve this:
1. Turn off Safe mode;
2. Chown Change File/directory owner under command line
Of course both of these methods require you to have the server permissions.