4' tall will work if that is all you have to work with, but you will just have to be more aware of how tall your plants are. The type of light and exhaust will be big factors as well. HPS will make that box hot and if the light gets too close to the plant it will scorch it.
My first grow box was 2' deep 3 ' wide and 4 'tall. Fortunately, I was using LED's as my third grow went to the top of the box, I had to bend the top branches over.
Once you get started 4' will seem cramped, but if that is all you have, it will work just fine.
One last thing, unless you are really small, a 4' deep 4' tall cabinet will be a pain in the ass to work the back in. You will probably end up not using the back to it's full advantage because it is a pain to get to.
Although, I did have a friend solve that problem by making a heavy duty carousel.