Created
August 2, 2012 10:01
-
-
Save jpauli/3236041 to your computer and use it in GitHub Desktop.
Save your I/Os, dont use open_basedir
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$> strace php -r '@unlink("foo.bar");' 2>&1|grep 'foo.bar' | |
execve("/usr/bin/php", ["php", "-r", "@unlink(\"foo.bar\");"], [/* 17 vars */]) = 0 | |
unlink("foo.bar") = -1 ENOENT (No such file or directory) | |
$> strace php -d open_basedir="./" -r '@unlink("foo.bar");' 2>&1|grep 'foo.bar' | |
execve("/usr/bin/php", ["php", "-d", "open_basedir=./", "-r", "@unlink(\"foo.bar\");"], [/* 17 vars */]) = 0 | |
lstat("/home/tyrael/foo.bar", 0x7fff1f569b80) = -1 ENOENT (No such file or directory) | |
lstat("/home/tyrael/foo.bar", 0x7fff1f569b90) = -1 ENOENT (No such file or directory) | |
readlink("/home/tyrael/foo.bar", 0x7fff1f56fd30, 4095) = -1 ENOENT (No such file or directory) | |
unlink("foo.bar") = -1 ENOENT (No such file or directory) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment