For most open chords you want your thumb sort of over the fretboard. Beginners sometimes find it easier to have a gap from the V part of your hand (between your thumb and index finger) and the fretboard, while more experienced players will have no gap. For scales you want to have your thumb behind the fretboard, sort of in line with your index or middle finger. As long as your thumb isn't pointing towards the headstock of the guitar you should be fine ?