Obtain user's extra groups so as to be able to chgrp
Merged from 5.2
Fixed logic
Fixed logic