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;
if(opwd!=null) owner=opwd.getLoginName();
else owner=Messages.PAMSecurityRealm_Uid(st.uid());
return FormValidation.error(Messages.PAMSecurityRealm_RunAsUserOrBelongToGroupAndChmod(owner, user, group));