# FTPS and SFTP trying to make directories?

**URL:** https://www.finalbuilder.com/forums/t/ftps-and-sftp-trying-to-make-directories/3698
**Category:** Bugs
**Created:** [August 21, 2018, 4:29am UTC](https://www.finalbuilder.com/forums/t/ftps-and-sftp-trying-to-make-directories/3698 "2018-08-21T04:29:57Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![ames](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/ames/32/44_2.png) [@ames](https://www.finalbuilder.com/forums/u/ames)
#### Post date: [August 21, 2018, 4:29am UTC](https://www.finalbuilder.com/forums/t/ftps-and-sftp-trying-to-make-directories/3698/1 "2018-08-21T04:29:57Z")

</div>

We upgraded to lastest release version and now on FTPS and SFTP we are getting errors that directories already exist. It’s like FB is trying to make each directory (even if it exists on ftp) when it’s batch uploading an entire directory.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [August 22, 2018, 12:13pm UTC](https://www.finalbuilder.com/forums/t/ftps-and-sftp-trying-to-make-directories/3698/2 "2018-08-22T12:13:14Z")

</div>

You haven’t really give us much to go on. Which version did you update from? We would need a lot more information to be able to figure out what is going, which actions you are using, log output etc. Also, which SFTP abd FTPS server software are you connecting to? Ideally if you can send your project file to support @ [finalbuilder.com](http://finalbuilder.com) we can take a look and see if we can replicate the behavor here.

---

<div class="post-metadata">

### Author: ![ames](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/ames/32/44_2.png) [@ames](https://www.finalbuilder.com/forums/u/ames)
#### Post date: [August 23, 2018, 10:32am UTC](https://www.finalbuilder.com/forums/t/ftps-and-sftp-trying-to-make-directories/3698/3 "2018-08-23T10:32:10Z")

</div>

Sorry I left out details because I was assuming others were seeing it.   
  
 On 8.0.0.2442. It worked with previous versions. These scripts are years old. I skipped a few builds in there. I might uninstall and go back a few months.   
  
 FTPS upload gives “FTPS Upload Files action failed. 550 Directory already exists”   
  
 It’s a FileSet which is folders and files. And then an upload of that FileSet.   
  
 I’m told it’s Filzilla Server, but haven’t confirmed.   
  
 I’d have to see if we can sanitize the project file enough to send and still have it make sense for debugging.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [August 24, 2018, 1:21am UTC](https://www.finalbuilder.com/forums/t/ftps-and-sftp-trying-to-make-directories/3698/4 "2018-08-24T01:21:05Z")

</div>

I have managed to reproduce the problem here, it looks like the newer version of the library we are using has changed the exception type and we are now looking at the wrong property for the error codes. Working on a fix now.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [August 24, 2018, 6:04am UTC](https://www.finalbuilder.com/forums/t/ftps-and-sftp-trying-to-make-directories/3698/5 "2018-08-24T06:04:23Z")

</div>

Please try this build : [http://downloads.finalbuilder.com/downloads/finalbuilder/800/FB800\_2453.exe](http://downloads.finalbuilder.com/downloads/finalbuilder/800/FB800_2453.exe)   
  
 Note this build only has changes/fixes for FTPS, I wasn’t able to reproduce the error for SFTP.

---

<div class="post-metadata">

### Author: ![ames](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/ames/32/44_2.png) [@ames](https://www.finalbuilder.com/forums/u/ames)
#### Post date: [September 16, 2018, 5:48pm UTC](https://www.finalbuilder.com/forums/t/ftps-and-sftp-trying-to-make-directories/3698/6 "2018-09-16T17:48:42Z")

</div>

Sorry for the delay in testing this. Looks good. No issues on this build.

---

<div class="post-metadata">

### Author: ![ames](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/ames/32/44_2.png) [@ames](https://www.finalbuilder.com/forums/u/ames)
#### Post date: [December 21, 2018, 6:50pm UTC](https://www.finalbuilder.com/forums/t/ftps-and-sftp-trying-to-make-directories/3698/7 "2018-12-21T18:50:49Z")

</div>

The build you linked to fixed the bug. It looks like the bug is present in 8.0.0.2508. Did this fix not get merged back into production?

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [December 21, 2018, 10:56pm UTC](https://www.finalbuilder.com/forums/t/ftps-and-sftp-trying-to-make-directories/3698/8 "2018-12-21T22:56:56Z")

</div>

The fix is definitely in the production build, so my guess is this will be a slightly different issue. Please send your logs to support - although we probably won’t get to look at it till the new year.

---

<div class="post-metadata">

### Author: ![ames](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/ames/32/44_2.png) [@ames](https://www.finalbuilder.com/forums/u/ames)
#### Post date: [December 23, 2018, 6:25pm UTC](https://www.finalbuilder.com/forums/t/ftps-and-sftp-trying-to-make-directories/3698/9 "2018-12-23T18:25:01Z")

</div>

The FTPS server for this customer is running Filezilla Server.

I went back to 2453 and everything is good again.

From the logs:  
Aquiring connection object…  
Building directory tree  
Creating remote directories…  
FTPS Upload Files action failed. Directory value cannot be empty.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [December 23, 2018, 11:56pm UTC](https://www.finalbuilder.com/forums/t/ftps-and-sftp-trying-to-make-directories/3698/10 "2018-12-23T23:56:01Z")

</div>

Ok, this looks like a slightly different issue. There were further changes to the FTPS actions since build 2453 to improve the performance and fix other issues we found in testing. I will look into this in the new year. In the mean time, if you can send your full log output to support I can try to figure out exactly what is happening.

---

<div class="post-metadata">

### Author: ![ames](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/ames/32/44_2.png) [@ames](https://www.finalbuilder.com/forums/u/ames)
#### Post date: [October 8, 2019, 1:10am UTC](https://www.finalbuilder.com/forums/t/ftps-and-sftp-trying-to-make-directories/3698/11 "2019-10-08T01:10:06Z")

</div>

I just upgraded to 2590 and this bug is still around. Back to 2453 I guess.

The logs always look something like this.

SEND: CWD /  
RECEIVE: 250 CWD successful. “/” is current directory.  
Creating remote directory : /data  
SEND: MKD data  
RECEIVE: 550 Directory already exists  
SEND: CWD /  
RECEIVE: 250 CWD successful. “/” is current directory.  
Creating remote directory : /Styles  
SEND: MKD Styles  
RECEIVE: 550 Directory already exists  
FTPS Upload Files action failed. Directory value cannot be empty.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [October 8, 2019, 5:57am UTC](https://www.finalbuilder.com/forums/t/ftps-and-sftp-trying-to-make-directories/3698/12 "2019-10-08T05:57:54Z")

</div>

Please send the full log for the Fileset and the FTPS actions to support @ [finalbuilder.com](http://finalbuilder.com) so we can try to reproduce the exact conditions here.

We did take an update to the SSH/SFTP/FTPS libraries recently so it is worth trying this build (which is the same as the most recent release otherwise) which has that update applied.  
[https://downloads.finalbuilder.com/downloads/finalbuilder/800/FB800\_2593.exe](https://downloads.finalbuilder.com/downloads/finalbuilder/800/FB800_2593.exe)

All of my SSH/SFTP/SSH tests (against bitvise and filezilla) worked fine so I need a new test that will reproduce this.

Can you also confirm which FTPS Server (and version) you are using? Different servers exhibit different behaviors (despite the spec) - client libraries typically have a bunch of workarounds for specific servers/versions to deal with non standard behavior - it’s possible the vendor hasn’t encountered a behavior.

---

<div class="post-metadata">

### Author: ![ames](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/ames/32/44_2.png) [@ames](https://www.finalbuilder.com/forums/u/ames)
#### Post date: [October 8, 2019, 5:04pm UTC](https://www.finalbuilder.com/forums/t/ftps-and-sftp-trying-to-make-directories/3698/13 "2019-10-08T17:04:03Z")

</div>

2593 has same issue. I’ll have to sort out some way to scrub data in order to send you logs. The script is nothing crazy.

FTPS Connect, FileSet define, FTPS Upload the set, FTPS disconnect.

FTPS server is FileZilla. But we have ran scripts against large hosting companies FTPS running I don’t know what and same results. SFTP and FTP are fine. Just FTPS.

---

<div class="post-metadata">

### Author: ![ames](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/ames/32/44_2.png) [@ames](https://www.finalbuilder.com/forums/u/ames)
#### Post date: [October 9, 2019, 3:24pm UTC](https://www.finalbuilder.com/forums/t/ftps-and-sftp-trying-to-make-directories/3698/14 "2019-10-09T15:24:55Z")

</div>

Logs sent. I ran it once with 2453 (worked) and then 2593 (failed). So the logs should have both.
