multi uploads permissions
| From: | Cameron Metzke | Date: | Thu, 02 Oct 2003 03:16:41 +0000 |
| Subject: | multi uploads permissions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-164669@lists.php.net to get a copy of this message | ||
Hi all,
I have a multi upload script, which works, but the end result is that the
files that are uploaded are set to permissions of 600. Im think this is
because they have a tmp name then are written to the "uploads" folder so in
effect they are written by another system user? (lol ok so im new to php not
sure if i followed that myself). well here is the script.
-----------Start Code----------
$where_to_go = $path."/home/user/uploader/originals/"; //with trailing slash
if (!$Submit)
{
while (list ($key, $value) = each ($_FILES['file']['tmp_name']))
{
umask(000);
$ok = (move_uploaded_file($_FILES['file']['tmp_name'][$key], $where_to_go .
$_FILES['file']['name'][$key]));
----------End Code---------------
is there anyway to set the permissions to 777 as i would like to further
manipulate the images? and is that a good idea? or would it be better to
chown them, (which i have no idea how to do via php). Or does anyone have
any other ideas im completely stumped.
Thankyou
Cam