I'm sure the answer to this is pretty simple, and it might not be PHP-specific, but I'm trying to use PHP's copy() function to copy an image from one user to another as part of a custom CMS setup.
For example:
copy('/home/user1/public_html/images/image.png', '/home/user2/public_html/images/image.png');
Which returns the usual:
[function.copy]: failed to open stream: Permission denied
I've tried:
-CHMOD user2's "images" folder to 777 (just to test, didn't work)
-Create a new system group, put both users in it, and CHGRP the folder to that group's id. Also tried putting users "apache" and "nobody" in the same group but to no effect.
open_basedir is not enabled/configured (not sure if that matters) and PHP isn't in safe mode. PHP5 handler is suPHP and suEXEC is on. Running WHM 11.3 on a CentOS 5.6 VPS box. I'm sure the solution isn't that difficult but I've searched all around and can't find the answer. Thanks!