Bug #13500: copy() gives incorrect open_basedir() errors
| From: | nate at newdream dot net | Date: | Mon, 01 Oct 2001 18:38:23 +0000 |
| Subject: | Bug #13500: copy() gives incorrect open_basedir() errors | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-66952@lists.php.net to get a copy of this message | ||
From: nate@newdream.net
Operating system: Debian GNU/Linux 2.4
PHP version: 4.0.6
PHP Bug Type: Filesystem function related
Bug description: copy() gives incorrect open_basedir() errors
It appears that copy() is overprotective of open_basedir restrictions.
At the web host I administer we restrict each VirtualHost to the owning
user's homedir using php_admin_value open_basedir /tmp:/home/user
All is well unless the user attempts to copy files. With ANY file copying
operation, even copying files within one directory that is allowed by
open_basedir, copy() fails with an open_basedir error (File is in wrong
directory, open_basedir restriction in effect.) The directory the error
complains about is ALWAYS allowed in the user's open_basedir setting.
This is especially evident when uploading files. open_basedir is set to
allow for access to /tmp, but if users attempt to copy() an uploaded file
from /tmp to /home/user, it gives an error. If the user instead calls
move_uploaded_file() it is successful.
--
Edit bug report at: http://bugs.php.net/?id=13500&edit=1