If putting the camera at the end of the hallway I would say mount it on the wall, that way you can have the camera slightly lower and you are getting a better angle to capture peoples faces.
The downside with mounting on a ceiling is the closer people get to the camera the less likely you are going to see there face and only see the top of their head.
Just bear in mind the ceiling height when if you mount it on a wall as its more open to damage / vandalism.