Mailinglisten-Archive |
Hallo Enrico,
> was genau macht denn alles dieser safe_mode ?
> mir schien es doch etwas anders, z.b. beschraenkung auf bestimmte
> verzeichnisse - das ist etwas anderes als file-permission-checking ...
>
Man kann nur noch auf Files im System zugreifen, die dem Benutzer gehören
unter dem das Script läuft.
Aus dem Manual.
When safe_mode is on, PHP checks to see if the owner of the current script
matches the owner of the file to be operated on by a file function.
For example:
-rw-rw-r-- 1 rasmus rasmus 33 Jul 1 19:20 script.php
-rw-r--r-- 1 root root 1116 May 26 18:01 /etc/passwd
Running this script.php
<?php
readfile('/etc/passwd');
?>
results in this error when safe mode is enabled:
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 line2
Auszug aus den Funktinoen die unter safemode nur noch teilweise zu verfügung
stehen:
include()
require()
exec()
system()
passthru()
popen()
mkdir()
rmdir()
rename()
unlink()
copy()
chgrp()
chown()
chmod()
touch()
symlink()
usw.
php::bar PHP Wiki - Listenarchive