code: private static void setMode(Resource file, int mode) throws ApplicationException {
  	if (mode == -1 || SystemUtil.isWindows()) return;
  	try {
  	    file.setMode(mode);
  	    // FileUtil.setMode(file,mode);
  	}
  	catch (IOException e) {
  	    throw new ApplicationException("can't change mode of file " + file, e.getMessage());
  	}
      }
docs: change mode of given file
  
  @param file
  @throws ApplicationException