law: Indian Ports Act, 1908
  15. Power to board vessels and enter buildings 
  (1) The conservator or any of his assistant may, whenever he suspects
  
  that any offence against this Act has been, or is about to be, committed or
  
  whenever it is necessary for him so to do in the performance of any duty
  
  imposed upon him by this Act,
  and the person appointed under this act to receive any port
  
  dues, fees or other charges payable in respect of any vessel, may, whenever it
  
  is necessary for him so to do in the performance of any duty imposed upon him
  
  by this Act,
  either alone or with any other person, board any vessel, or
  
  enter any building or place, within the limits of any port subject to this Act.
  
  
  (2) If the master of the vessel, or any person in possession or
  
  occupation of the building or place, without lawful excuse, refuses to allow
  
  any such person as is mentioned in sub-section (1) to board or enter such
  
  vessel, building or place in the performance of any duty imposed upon him by
  
  this Act, he shall for every such offence be punishable with fine which may
  
  extend to two hundred rupees.