UPDATED FOR FURTHER CLARITY:
According to http://expressionengine.com/user_guide/installation/installation.html, it says:
For most Unix hosts the following is typical, but you may check with your your host to see if more restrictive permissions can be used to allow PHP to write to files (666) and folders (777). On Windows servers the following will not apply, but you will need to ensure that the the files and folders are writable by ExpressionEngine. You may need to to contact your host for this.
Not sure what this means. I can change the specific files and folders to 666 and 777 respectively where I am the chown'er, but the above sounds like I need to allow PHP to do this too?
ORIGINAL QUESTION:
I need to ensure that PHP can write to specific files (666) and folders (777).
How do I do this?