Metal Junction Box screwed to wood - same screw used for grounding
Screws that mount the box to the framing are not allowed to be used for grounding. There is a separate hole in most of the pancake boxes for a grounding screw, a 10/32 thread and you can pick them up at your home store. If there is conduit terminating in the box, that might serve as a ground.