Edit report at http://bugs.php.net/bug.php?id=53796&edit=1
ID: 53796 Updated by: paj...@php.net Reported by: markh789 at gmail dot com Summary: Allow setting to home directory "~" on Linux with open_basedir -Status: Open +Status: Bogus Type: Feature/Change Request Package: Safe Mode/open_basedir Operating System: Linux/Unix PHP Version: 5.3.5 Block user comment: N Private report: N New Comment: ~ is a shell hack and has nothing to do with the OS paths. Previous Comments: ------------------------------------------------------------------------ [2011-01-20 02:21:21] markh789 at gmail dot com Fixing Package ------------------------------------------------------------------------ [2011-01-20 02:16:21] markh789 at gmail dot com Bad title, fixing. ------------------------------------------------------------------------ [2011-01-20 02:15:36] markh789 at gmail dot com 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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=53796&edit=1