Apache CLI?
All files/folders crated via php will be owned by apache
Then the php script should also chmod all its created files/folder to 666/777
Under multiple level of files/folders creation (since 2nd level) you may experienced permission problem via ftp.
Well-scripts will not do create folder,
it will require you to create that folder and chmod 777 via ftp and then it will upload the files under that folder in flatten level and then chmod to 777 then you can access/delete it via ftp
Apache CGI (suPHP)
PHP Script will execute under uid same as it's own uid
All files/folders created via php will be the same uid as script's owner
Not much webhosting run php in cgi mode due to it's increase cpu load.
For your question
Contact server admin to chown those files for you.