http://it.php.net/manual/it/function.chmod.php

ecco cosa ti serve