Hopefully the below code help you
// creating the ACL
$aclProvider = $this->get('security.acl.provider');
$objectIdentity = ObjectIdentity::fromDomainObject($the_object_to_be_granted);
$acl = $aclProvider->createAcl($objectIdentity);
$securityIdentity = new RoleSecurityIdentity("CUSTOM_ROLE_YOU_HAVE");
// grant owner access
$acl->insertObjectAce($securityIdentity, MaskBuilder::MASK_OWNER);// This is sample you can use any other masks you need
$aclProvider->updateAcl($acl);
You can obtain more info on the following link (Symfony ACL)