title: JSCH setCommand is not working
body: <p>No Exception comes and Command is also not making any work based on command mentioned.Here permisson of directory is not created and directory is also not created.Please give your suggestion.</p>
  
  <p><strong>Update :</strong>
  channelexe.getExitStatus is added but problem is it gives -1, what is the meaning of this ?. I don't know how to find some explaination why command is not doing it's job(update 777 mode of <strong>fileDir1</strong>) .</p>
  
  <pre><code>        String depDir = "/usr/local/FTPReceive/DEPLOYED/fileDir1";
          log.info("updateDepositedFilePermission ........ starts"); 
          Session session = new FTPComponent().getSession("");
          Channel channel = null;
          ChannelSftp channelSftp = null;
          try
          {
              session.connect();
              System.out.println("session is alive:" + session.isConnected());
              channel = session.openChannel("sftp");
              channel.connect();
  
              channelSftp = (ChannelSftp) channel;
              ChannelExec channelexe = (ChannelExec) session.openChannel("exec");
              channelexe.setCommand("chmod 777 -R " + depDir);                
              channelexe.connect();
              System.out.println("channelexe.getExitStatus:"+channelexe.getExitStatus());
          }
          catch (Exception e1)
          {
              e1.printStackTrace();
              System.out.println("Manual Exception in updateDepositedFilePermission:" + CommonUtil.getExceptionString(e1));
          }
  </code></pre>