How to use access callback and access arguments to restrict access by role? I'm creating website for a hostel, in this there are two roles (guest and property owner). 

if i give 'access callback' =&gt; TRUE the page can be accessed by both of the property owner and guest, but i don't need it, the page should be accessed by only property owners.
The callback is, well the callback; the function that will be run to determine access for the path.

The arguments are the arguments provided to that function for context. They can be static, or come from parts of the URL (not query params).

What you need to do is instead of TRUE, provide the name of a function which determines whether the current user is a "property owner", and return TRUE or FALSE from that function to allow/deny access respectively.

The common way to achieve that for role-based access is to use hook_permission to provide your own permission to the system, call it "access top secret area" or whatever, grant the new permission to the property owner role through the UI, and change the access arguments to an array containing that new role.

The default access callback is user_access, so it will have the effect of running

$access = user_access('access top secret data');


Obviously if you need more advanced logic, e.g. to determine that a property owner is accessing only data on a property they actually own, a custom callback will make more sense.