Bug #17567: open_basedir does not work properly with symbolic links.

From: Date: Sun, 02 Jun 2002 19:59:27 +0000
Subject: Bug #17567: open_basedir does not work properly with symbolic links.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-9209@lists.php.net to get a copy of this message
From:             mburger@netbeyond.de
Operating system: Linux (SuSE)
PHP version:      4.2.1
PHP Bug Type:     Filesystem function related
Bug description:  open_basedir does not work properly with symbolic links.

Hello,

open_basedir has trouble with symlinks:

File: /var/www/server/xyz.com/ezdemo/htdocs/classes/ezfile.php

Symlink: /kunden/hosting/server -> /var/www/server

Unless I set open_basedir to '/' I get some errors like these:


open_basedir set to '/var' or '/kunden/hosting/server/xyz.com/ezdemo':

Warning: open_basedir restriction in effect. File is in wrong directory in
/var/www/server/xyz.com/ezdemo/htdocs/classes/ezfile.php on line 282

Warning:
fopen("/kunden/hosting/server/xyz.com/ezdemo/htdocs/classes/cache/02208adcfca7b0a5f64d1e07f5f5c385.php",
"w+") - Operation not permitted in
/var/www/server/xyz.com/ezdemo/htdocs/classes/ezfile.php on line 282


open_basedir set to '/kunden'

Warning: open_basedir restriction in effect. File is in wrong directory in
Unknown on line 0

Warning: Failed opening
'/kunden/hosting/server/xyz.com/ezdemo/htdocs/index_admin.php' for
inclusion (include_path='.:/usr/local/lib/php') in Unknown on line 0


Regards,
  Martin
-- 
Edit bug report at http://bugs.php.net/?id=17567&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=17567&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=17567&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=17567&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=17567&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17567&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=17567&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=17567&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=17567&r=submittedtwice
register_globals:    http://bugs.php.net/fix.php?id=17567&r=globals



Thread (4 messages)

« previous php.bugs (#9209) next »