code: public void chmod(String path, int permissions) throws IOException {
          SFTPv3FileAttributes atts = new SFTPv3FileAttributes();
          atts.permissions = permissions;
          setstat(path, atts);
      }
docs: Change file or directory permissions.
  @param path file or directory path.
  @param permissions POSIX permissions.
  @throws IOException in case of error.