String group;
Group g = api.getgrgid(st.gid());
if(g!=null) group=g.getName();
else group=String.valueOf(st.gid());
if ((st.mode()&FileStat.S_IRGRP)!=0) {
// the file is readable to group. Jenkins should be in the right group, then
return FormValidation.error(Messages.PAMSecurityRealm_BelongToGroup(user, group));
} else {
Passwd opwd = api.getpwuid(st.uid());
String owner;