oh, scusami, che poi in realtà serve anche a me
grazie mille !

PS: in questo caso quindi chmod($file, 0755); no ?