Bug #13500 Updated: copy() gives incorrect open_basedir() errors
| From: | sniper@php.net | Date: | Fri, 05 Jul 2002 18:25:23 +0000 |
| Subject: | Bug #13500 Updated: copy() gives incorrect open_basedir() errors | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-13251@lists.php.net to get a copy of this message | ||
ID: 13500
Updated by: sniper@php.net
Reported By: nate@newdream.net
-Status: Open
+Status: Bogus
Bug Type: Filesystem function related
Operating System: Debian GNU/Linux 2.4
PHP Version: 4.0.6
New Comment:
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit http://www.php.net/support.php
Thank you for your interest in PHP.
Previous Comments:
------------------------------------------------------------------------
[2002-04-14 12:32:19] yves@creationz.org
Red Hat 7.2, Apache 1.3.20, PHP 4.0.6-12 using Plesk 2.5
copy() is working fine for me with
<Directory "/home/httpd/vhosts/mydomain.com/httpdocs">
php_admin_value upload_tmp_dir "/tmp"
php_admin_value open_basedir
"/home/httpd/vhosts/mydomain.com/httpdocs:/tmp"
</Directory>
------------------------------------------------------------------------
[2001-10-01 14:38:23] nate@newdream.net
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 this bug report at http://bugs.php.net/?id=13500&edit=1