When I create objects in Google Cloud Storage from a PHP Google App Engine instance, the ACL for owner doesn't get set, making it impossible to change things like cache control headers later on.
$options = ['gs' => ['acl' => 'public-read', 'Content-Type' => 'text/plain']];
$ctx = stream_context_create($options);
file_put_contents('gs://my_bucket/file.yadda');
How would I set a more detailed ACL setting, from PHP app engine, instead of using one of the predefined cloud storage ACL magic settings (public-read, owner-full-read-write, etc....)?
The simplest way would be to use the setup on default ACL for a bucket to make the default ACL on the bucket be what you want. At that point, anything created without an ACL declared will go to your default.
You don't even need to run anything in PHP to get that done. You just use your same code as now, don't specify an ACL, and you use gsutil to customize the default ACL with commands like :
gsutil defacl ch -u my-email@gmail.com:OWNER gs://«my_bucket»
More information here