I've on a drupal 6 site a custom module which generate a page, i send in that page a form.

When i try to test my form as an anonymous user, it doesn't work as i get:

You are not authorized to access this page.

I've a hook_perm on my module and permission are activate for anonymous user, but that still doesn't work, even after "cache clear" or "rebuild permission".

So i must have another permission in conflict here that forbid me to show my form to anonymous user (as an admin, i can see it). Is there a way for me to print the "rights" that forbid me to access my form, to get a list of the permission used in a specific page?

  • 1
    Is the path of your form's page under /admin by any chance?
    – Clive
    Commented Jan 27, 2014 at 17:07
  • 2
    It might help to also post your hook_menu that is generating the custom page.
    – Craig
    Commented Jan 27, 2014 at 17:17
  • Thx for reply. No i do not use admin in my path, i've also edit my question with the hook_menu. Commented Jan 28, 2014 at 8:35
  • I've reformulate the question and found that thread : drupal.stackexchange.com/questions/17214/… with a D7 answer, i need a D6. So i search in that way. Commented Jan 28, 2014 at 8:56

1 Answer 1


I get an solution : Exposed here in : https://drupal.org/node/109157

I had to add '"access callback" => TRUE' to my hook menu (TRUE because i want anonymous user get access to the page).

function custom_createAccount_menu()
  $items["createAccount"] = array(
    "title"=>t('Create an account'),
    "page callback"    => "_custom_createAccount",
    "access callback"  => TRUE,
    "access arguments" => array("access createAccount content"),

  return $items;

and that works.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.