If it is write permissions then use chmod on a unix box to change them. CHMOD is a unix utility, not php function.
If you are on NT/IIS box then you will need to set the IIS web site access permissions and the NTFS file system security permissions to allow write to the anonymous web user IURS_