NMS-6522 fix permissions issues with recent JDK