While in prison Joseph found favor in the eyes of the prison guard and he was placed in charge of all the other prisoners.
Wherever this young man went and whatever he did, the Lord made his way prosperous.
And the keeper of the prison committed to Joseph’s hand all the prisoners who were in the prison; whatever they did there, it was his doing. The keeper of the prison did not look into anything that was under Joseph’s authority because the Lord was with him; and whatever he did, the Lord made it prosper. (Genesis 39:22-23)