On her blog Nessa has a brief look at working with permissions with PHP via three functions - chown, chgrp and chmod.
PHP uses the same command as *nix systems when dealing with changing permissions for files. These commands are particularly useful in situations where PHP runs as a different user on the system, which is common when PHP is compiled as an Apache user.
She includes a basic syntax for each of them and how one (chmod) could be used in an example of file creation.