Google Storage - dynamically change ACL on single object (PHP)
Actually I've solved by using the Google_Service
$client = new Google_Client();
$client->setApplicationName('GoogleBuck/0.1');
$client->useApplicationDefaultCredentials(); // app engine env
$client->addScope('https://www.googleapis.com/auth/devstorage.full_control');
$storage = new Google_Service_Storage($client);
$acl = new Google_Service_Storage_ObjectAccessControl($client);
$acl->setEntity('allUsers');
$acl->setRole('READER');
$acl->setBucket($bucketName);
$acl->setObject($objectName);
To add
$response = $storage->objectAccessControls->insert($bucketName, $objectName, $acl);
To delete
$response = $storage->objectAccessControls->delete($bucketName, $objectName, 'allUsers');