cheers for that guys. I ended up with this:
//---------------CHMOD-------------------------
$ourFileName = "Artist-".$BandName.".php";
$ourFileHandle = fopen($ourFileName, 'w') or die("can't open file");
if (!chmod($ourFileName,0777))
die ("change permission to 777 failed.");
fclose($ourFileHandle);
//---------------CHMOD-------------------------
which is just what I wanted 🙂