Re: Problem with uploaded file

From: Date: Sun, 26 Sep 2004 14:06:00 +0000
Subject: Re: Problem with uploaded file
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-197871@lists.php.net to get a copy of this message
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" <sagar@rythumithra.com> wrote in message news:001801c4a3c0$9f246f70$161517ac@blackcat... 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

« previous php.general (#197871) next »