Hi, you can either use the chown function in php syntax: |int chown|(string filename, mixed user);
or use backticks (`) to call the system chown executable. The simplest way however might be to ask your sysadmin to set the umask for you.
best regards
Cameron Metzke wrote:
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
-- Raditha Dissanayake. ------------------------------------------------------------------------ http://www.radinks.com/sftp/ | http://www.raditha/megaupload/ Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 150 KB | with progress bar.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php