--TEST--
Test copy() function: usage variations - destination dir access perms
--SKIPIF--
---SKIPIF--
<?php
-if( (substr(PHP_OS, 0, 3) == "WIN") || (stristr(PHP_OS, "Mac")) )
+if( (stristr(PHP_OS, "Mac")) || (substr(PHP_OS, 0, 3) == "WIN") )
die("skip do not run on Win/MacOS");
+// Skip if being run by root (files are always readable, writeable and executable)
+$filename = dirname(__FILE__)."/copy_variation15_root_check.tmp";
+$fp = fopen($filename, 'w');
+fclose($fp);
+if(fileowner($filename) == 0) {
+ unlink ($filename);
+ die('skip...cannot be run as root\n');
+}
+unlink($filename);
?>
--FILE--
<?php
<?php
if( (stristr(PHP_OS, "Mac")) || (substr(PHP_OS, 0, 3) == "WIN") )
die("skip do not run on Win/MacOS");
+
+// Skip if being run by root (files are always readable, writeable and executable)
+$filename = dirname(__FILE__)."/copy_variation9_root_check.tmp";
+$fp = fopen($filename, 'w');
+fclose($fp);
+if(fileowner($filename) == 0) {
+ unlink ($filename);
+ die('skip...cannot be run as root\n');
+}
+unlink($filename);
?>
--FILE--
<?php