Sagar This is the code I use to change file permissions on a file that has been uploaded by a user to a predefined area with a predefined filename:
// Change File Permissions: chmod("{$uploadfile}", 0644); -- ----------------------------- Michael Mason Arras People www.arraspeople.co.uk ----------------------------- "Sagar C Nannapaneni" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hello folks, I'm facing some sort of problem here. I'm uploading a file from the clients system to the server. Everything working fine except that the file that is being uploaded is having a file permission of 600 ie only read and write to the owner only. So i'm not able to change the permissions (either with some ftp client or thru the file manager on the server) nor am i able to download the file even. Is there any way that i can set permissions to the files that are being uploaded.?? here is the code is used... $uploaddir = './photos/'; print "<pre>"; $arr_basename=explode(".",$_FILES['userfile0']['name']); $file_type=$arr_basename[1]; $nameofphoto=$profileid."1.".$file_type; @move_uploaded_file($_FILES['userfile0']['tmp_name'], $uploaddir . $nameofphoto); $uploaddir = './photos/'; print "<pre>"; $arr_basename=explode(".",$_FILES['userfile1']['name']); $file_type=$arr_basename[1]; $nameofphoto1=$profileid."2.".$file_type; @move_uploaded_file($_FILES['userfile1']['tmp_name'], $uploaddir . $nameofphoto1); $uploaddir = './photos/'; print "<pre>"; --- plzz help me out.. /sagar -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php