title: Could not change to work directory "/" when calling FileSystemManager.resolveFile with FTP URL
body: <p>I'm trying to put a file in a remote FTP host. This is how I usually do:</p>
  
  <pre><code>String ftpUri =
          "ftp://" + target.get(server).get("Username") + ":{" + target.get(server).get("Psswd") + "}@";
  if (StringUtils.isBlank(target.get(server).get("Port"))) {
      ftpUri += target.get(server).get("Hostname") + target.get(server).get("RemotePath");
  } else {
      ftpUri += target.get(server).get("Hostname") + ":" + target.get(server).get("Port") + target.get(server)
                                                                                                  .get("RemotePath");
  }
  
  System.out.println("ftpUri = " + ftpUri);
  FileSystemManager fsManager;
  try {
      fsManager = VFS.getManager();
  } catch (FileSystemException e) {
      throw new RuntimeException("Failed to get fsManager from VFS", e);
  }
  
  FileSystemOptions opts = new FileSystemOptions();
  
  FtpFileSystemConfigBuilder.getInstance().setPassiveMode(opts, true);
  
  FileObject remoteFile = fsManager.resolveFile(ftpUri, opts); // &lt;- it breaks
  </code></pre>
  
  <p>My <code>ftUri</code> is:</p>
  
  <pre class="lang-none prettyprint-override"><code>ftp://[username]:{[hash_password]}@[hostname]:21/users/afolder/anotherfolder/afile.pdf
  </code></pre>
  
  <p>But I'm getting the following exception:</p>
  
  <pre class="lang-none prettyprint-override"><code>Caused by: org.apache.commons.vfs2.FileSystemException: Could not change to work directory "/".
      at org.apache.commons.vfs2.provider.ftp.FtpClientFactory.createConnection(FtpClientFactory.java:130)
      ... 19 more
  </code></pre>
  
  <p>Is it possible to set a working directory path?</p>
  
  <p>My guess is that the FTP library is trying to work on the <code>root</code> directory, which I don't have any permission; however, I'm informing another path via the URI, but somehow the library insists to work in the <code>root</code> directory.</p>