Page 1 of 1

[SOLVED]Setting Upload File Permissions

Posted: Tue Aug 23, 2005 3:54 am
by blacksnday
In the following example of a image upload, how do I make it so that
when the tmp is place in the upload folder, the file permissions are
777? Right now it uploads with the permssions being at 600

Code: Select all

move_uploaded_file($_FILES['image']['tmp_name'], $uploads.'/'.$_FILES['image']['name'])
   or die ("Couldn't upload ".$_FILES['image']['name']."\n");

Posted: Tue Aug 23, 2005 5:54 am
by shiznatix

Code: Select all

chmod($uploads.'/'.$_FILES['image']['name'], 0777);

Posted: Tue Aug 23, 2005 6:31 am
by blacksnday
thanks :)
works like a charm