How do I set permissions for user roles in the install profile
To add a role you can use user_role_save():

$role = new stdClass();
$role-&gt;name = 'role_name';
$role-&gt;weight = 5;
user_role_save($role);


To grant specific permissions to a role you can use user_role_grant_permissions():

$grant = array('access content', 'access comments', 'etc...');
user_role_grant_permissions($role-&gt;rid, $grant);