|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-01-20 02:16 UTC] markh789 at gmail dot com
-Summary: Allow setting to home directory "~" on Linux
+Summary: Allow setting to home directory "~" on Linux with
open_basedir
[2011-01-20 02:16 UTC] markh789 at gmail dot com
[2011-01-20 02:21 UTC] markh789 at gmail dot com
-Package: Security related
+Package: Safe Mode/open_basedir
[2011-01-20 02:21 UTC] markh789 at gmail dot com
[2011-01-20 07:13 UTC] pajoye@php.net
-Status: Open
+Status: Bogus
[2011-01-20 07:13 UTC] pajoye@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 21:00:01 2025 UTC |
Description: ------------ This would be great if you could set it to the home directory, for example. open_basedir="~:/tmp:/pearpath" And then ~ would end up being the users home directory (that is running the script). So if the user was smith, it would be like: open_basedir="/home/smith:/tmp:/pearpath" But only for that script. Test script: --------------- <?php # Running as smith # open_basedir="~:/tmp:/pearpath" # All "public" directory's are CHMOD to 777 // Test 1 touch("/tmp/test"); // pass // Test 2 touch("/home/smith/public/test"); // pass // Test 3 touch("/home/john/public/test"); // fail ?> Expected result: ---------------- Test 3 should fail. Actual result: -------------- Test 3 passes.