how do i programmatically set the ANONYMOUS USER permissions on a site install profile? I am having trouble figuring out how to set permissions for users I personally did not programmatically create in my site installation profile. Can someone please help?

I would like to set 'View published content' as true for the ANONYMOUS USER user role in the .install file.

I am using the code below to grant permissions; but I do not know how to access permissions for the ANONYMOUS USER role.

       // Create the roles.
$roles['Content editor'] = array(
    'name' =&gt; 'Content editor',
    'weight' =&gt; $weight++,
    'permissions' =&gt; $base_permissions,
);
foreach ($roles as $role) {
    $role_object = new stdClass();
    $role_object-&gt;name = $role['name'];
    $role_object-&gt;weight = $role['weight'];

    // Save the role.
    user_role_save($role_object);

    // Grant permissions.
    if (!empty($role['permissions'])) {
        user_role_grant_permissions($role_object-&gt;rid, $role['permissions']);
    }
There is a constant for the anonymous RID named DRUPAL_ANONYMOUS_RID.

So, you would be able to use something like:

user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('your permission 1'));