Hook_enable vs hook_install [granting permissions to user role]
It should work on install. Are you actually uninstalling the module? Disabling and uninstalling is not the same thing in Drupal 7. Uninstall at admin/modules/uninstall, once the module is disabled. You can use drush pm-disable/pm-uninstall module_name.


test.module  

function test_permission() {
  return array(
    'test permission' =&gt; array(
      'title' =&gt; t('Test permission title'),
    ),
  );
}

test.install  

function test_install() {
  $test_perm = array('test permission');

  $perms = module_invoke_all('permission');
  // We can find the 'test permission' in $perms.

  $role = user_role_load_by_name('administrator');
  user_role_grant_permissions($role-&gt;rid, $test_perm);
}



The above gives administrators the test permission on module install.