How do I set permissions for user roles in the install profile I have a content type which I am creating on install profile, and I want to create a user that has permissions to edit that content type. How do I create user roles and permissions for those 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);