ID:               13500
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Open
 Bug Type:         Filesystem function related
 Operating System: Debian GNU/Linux 2.4
 PHP Version:      4.0.6
 New Comment:

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>


Previous Comments:
------------------------------------------------------------------------

[2001-10-01 14:38:23] [EMAIL PROTECTED]


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

Reply via email to