fomalhaut
Member
- Messages
 - 107
 
- Reaction score
 - 0
 
- Points
 - 16
 
Hello.
In PHP, I upload certain files through a html form and then I move them in ad-hoc directory.
That's works fine (the files stand finally where I wanted), but on x10 they have not the same file mode:
I upload a file with .MUS extension ==> mode was 0644 (that's I want)
I upload a file with .html extension ==> mode was 0600 (I'ld like to have 0644).
	
	
	
		
On my home server, the twice have mode 0644.
May I add a chmod to force the 0644 in the script ? Or how do I do ?
Thanks for your help.
fomalhaut.x10.com : Compte Rendus d'Observations Astronomiques
			
			In PHP, I upload certain files through a html form and then I move them in ad-hoc directory.
That's works fine (the files stand finally where I wanted), but on x10 they have not the same file mode:
I upload a file with .MUS extension ==> mode was 0644 (that's I want)
I upload a file with .html extension ==> mode was 0600 (I'ld like to have 0644).
		PHP:
	
	  $uploadfile = $uploaddir . basename($_FILES['fileNameAIns']['name']);
  $Tmsg = "Création du CROA n°<b>" . $noCROAAIns . "</b> effectuée";
  if (rename($_FILES['fileNameAIns']['tmp_name'], $renamedfile)) {
    $Tmsg = $Tmsg . "<br />et fichier mis en place";    
  }
	May I add a chmod to force the 0644 in the script ? Or how do I do ?
Thanks for your help.
fomalhaut.x10.com : Compte Rendus d'Observations Astronomiques