 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
Justin Knash
Joined: 10 Jan 2005 Posts: 3
|
|
SyncFTPDir, SFTP and Synchronizing Directories |
|
We are running 247 version 3.4.24, and are having issues whenever we try to sync files to an ftp server via secureftp. The code is as follows - // This script synchronizes files on the remote // Web server directory with files on the local computer // Get files from Osiris SyncFTPDir( "REMOTE", "server1", "username", "password", "/path/to/files", "c:\\ftpsync\\inbound\\", True, False, True, True ) FTPConfig("FTP PROTOCOL", "SECURE") // Put files on webserver SyncFTPDir( "LOCAL", "server2", "username", "password", "c:\\ftpsync\\inbound\\", "/path/to/files", True, False, True, True ) The first part runs great. It's syncing files from c:\ftpsync\inbound to server2:/path/to/files that gives us the following error - An error occurred while executing automation script: Line 11: Error creating subdirectory "/path/to/new/subdir". FTP Error. Could not create new directory "subdir". Cannot Create "subdir" directory: failure. Extended error code: 15. If I remove the subdir directory prior to running the sync to server2, the job completes without any errors. Any help would be much appreciated. Justin
|
|
Mon Jan 10, 2005 5:41 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7970
|
|
Re: SyncFTPDir, SFTP and Synchronizing Directories |
|
Could it be a permission issue? Does it work if you use a different name for the "subdir"? : We are running 247 version 3.4.24, and are having issues whenever we try to : sync files to an ftp server via secureftp. The code is as follows - : // This script synchronizes files on the remote : // Web server directory with files on the local computer : // Get files from Osiris : SyncFTPDir( "REMOTE", "server1", "username", : "password", "/path/to/files", : "c:\\ftpsync\\inbound\\", True, False, True, True ) : FTPConfig("FTP PROTOCOL", "SECURE") : // Put files on webserver : SyncFTPDir( "LOCAL", "server2", "username", : "password", "c:\\ftpsync\\inbound\\", : "/path/to/files", True, False, True, True ) : The first part runs great. It's syncing files from c:\ftpsync\inbound to : server2:/path/to/files that gives us the following error - : An error occurred while executing automation script: Line 11: Error creating : subdirectory "/path/to/new/subdir". FTP Error. Could not create : new directory "subdir". Cannot Create "subdir" : directory: failure. Extended error code: 15. : If I remove the subdir directory prior to running the sync to server2, the : job completes without any errors. : Any help would be much appreciated. : Justin
|
|
Mon Jan 10, 2005 7:00 pm |
|
 |
Tim Benning
Joined: 10 Jan 2005 Posts: 10
|
|
Re: SyncFTPDir, SFTP and Synchronizing Directories |
|
: Could it be a permission issue? : Does it work if you use a different name for the "subdir"? No, we ran the job as both a local user ID and as root. Tim
|
|
Mon Jan 10, 2005 7:36 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7970
|
|
Re: SyncFTPDir, SFTP and Synchronizing Directories |
|
What about that directory name? Did you see "File Caching Internet Options" topic in the on-line help? Do you have caching disabled? : No, we ran the job as both a local user ID and as root. : Tim
|
|
Mon Jan 10, 2005 10:48 pm |
|
 |
Tim Benning
Joined: 10 Jan 2005 Posts: 10
|
|
Re: SyncFTPDir, SFTP and Synchronizing Directories |
|
: What about that directory name? : Did you see "File Caching Internet Options" topic in the on-line : help? Do you have caching disabled? I do have the Internet Options set to 'Every visit to the page'. SyncFTPDir fails when checking for subdirectories. If the directory does not exist, it creates it but then cannot change the current working directory to it. If the directory already exists, it is not recognized and SyncFTPDir attempts to create it again. We have run the function with both root and a local user ID with appropriate rights.
|
|
Tue Jan 11, 2005 11:05 am |
|
 |
Tim Benning
Joined: 10 Jan 2005 Posts: 10
|
|
Re: SyncFTPDir, SFTP and Synchronizing Directories |
|
What is extended error code 15?
|
|
Tue Jan 11, 2005 11:15 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7970
|
|
Re: SyncFTPDir, SFTP and Synchronizing Directories |
|
FTP codes are specific to FTP server software. You will need to check with your FTP server vendor to find out that code means. Here is what you can do now: Try turning on the tracing/logging options in Tools/Options menu Log page and then running the job again. Check ftp.log file for FTP trace. Please post here a few lines prior and including the error line so we can together figure out what is causing the problem. : What is extended error code 15?
|
|
Tue Jan 11, 2005 11:55 am |
|
 |
Tim Benning
Joined: 10 Jan 2005 Posts: 10
|
|
Re: SyncFTPDir, SFTP and Synchronizing Directories |
|
For this execution, no files or folders existed on the destination server. 'folder' was successfully created, but could not be set as the working directory afterwards readme.txt was the file successfully copied to the destination directory readme2.txt is in folder, but processing never got that far... Thanks in advance, Tim **** 1/11/2005 10:47:05 **** FTP 1/11/2005 10:47:05>> LOG> Loading Winsock interface... FTP 1/11/2005 10:47:05>> LOG> Winsock interface initialized FTP 1/11/2005 10:47:05>> LOG> Initializing SSH/SFTP session... FTP 1/11/2005 10:47:05>> LOG> SSH/SFTP session started FTP 1/11/2005 10:47:05>> LOG> Connecting to SERVER:22 as ratesheet FTP 1/11/2005 10:47:05>> LOG> Looking up host "SERVER" FTP 1/11/2005 10:47:05>> LOG> Connecting to IPADDRESS port 22 FTP 1/11/2005 10:47:05>> LOG> Server version: SSH-2.0-OpenSSH_3.6.1p1+CAN-2004-0175 FTP 1/11/2005 10:47:05>> LOG> We claim version: SSH-2.0-SshSftp-Local: Jul 31 2002 08:56:43 FTP 1/11/2005 10:47:05>> LOG> Using SSH protocol version 2 FTP 1/11/2005 10:47:05>> LOG> Doing Diffie-Hellman group exchange FTP 1/11/2005 10:47:05>> LOG> Doing Diffie-Hellman key exchange FTP 1/11/2005 10:47:06>> LOG> Host key ctx->do_ssh2_transport.fingerprint is: FTP 1/11/2005 10:47:06>> LOG> ssh-rsa 1024 KEY... FTP 1/11/2005 10:47:06>> LOG> Initialised AES-256 client->server encryption FTP 1/11/2005 10:47:06>> LOG> Initialised AES-256 server->client encryption FTP 1/11/2005 10:47:06>> LOG> Keyboard-interactive authentication refused FTP 1/11/2005 10:47:06>> LOG> Sent password FTP 1/11/2005 10:47:07>> LOG> Access granted FTP 1/11/2005 10:47:07>> LOG> Opened channel for session FTP 1/11/2005 10:47:07>> LOG> Started a shell/command FTP 1/11/2005 10:47:07>> LOG> Connected FTP 1/11/2005 10:47:07>> LOG> /www/ratesheet/ FTP 1/11/2005 10:47:07>> LOG> /www/ratesheet/ FTP 1/11/2005 10:47:07>> LOG> www/ratesheet/ FTP 1/11/2005 10:47:07>> LOG> ww/ratesheet/ FTP 1/11/2005 10:47:07>> LOG> w/ratesheet/ FTP 1/11/2005 10:47:07>> LOG> /ratesheet/ FTP 1/11/2005 10:47:07>> LOG> ratesheet/ FTP 1/11/2005 10:47:07>> LOG> atesheet/ FTP 1/11/2005 10:47:07>> LOG> tesheet/ FTP 1/11/2005 10:47:07>> LOG> esheet/ FTP 1/11/2005 10:47:07>> LOG> sheet/ FTP 1/11/2005 10:47:07>> LOG> heet/ FTP 1/11/2005 10:47:07>> LOG> eet/ FTP 1/11/2005 10:47:07>> LOG> et/ FTP 1/11/2005 10:47:07>> LOG> t/ FTP 1/11/2005 10:47:07>> LOG> / FTP 1/11/2005 10:47:07>> LOG> Failed to get file "/www/ratesheet/readme.txt" attributes: no such file or directory
|
|
Tue Jan 11, 2005 12:54 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7970
|
|
Re: SyncFTPDir, SFTP and Synchronizing Directories |
|
It looks like the problem is in the destination folder path (target_dir parameter in SyncFTPDir as it is called in the manual). How did you enter it? Did you specify relative or absolute path? : For this execution, no files or folders existed on the destination server. : 'folder' was successfully created, but could not be set as the working : directory afterwards : readme.txt was the file successfully copied to the destination directory : readme2.txt is in folder, but processing never got that far... : Thanks in advance, : Tim : **** 1/11/2005 10:47:05 **** : FTP 1/11/2005 10:47:05>> LOG> Loading Winsock interface... : FTP 1/11/2005 10:47:05>> LOG> Winsock interface initialized : FTP 1/11/2005 10:47:05>> LOG> Initializing SSH/SFTP session... : FTP 1/11/2005 10:47:05>> LOG> SSH/SFTP session started : FTP 1/11/2005 10:47:05>> LOG> Connecting to SERVER:22 as ratesheet : FTP 1/11/2005 10:47:05>> LOG> Looking up host "SERVER" : FTP 1/11/2005 10:47:05>> LOG> Connecting to IPADDRESS port 22 : FTP 1/11/2005 10:47:05>> LOG> Server version: : SSH-2.0-OpenSSH_3.6.1p1+CAN-2004-0175 : FTP 1/11/2005 10:47:05>> LOG> We claim version: : SSH-2.0-SshSftp-Local: Jul 31 2002 08:56:43 : FTP 1/11/2005 10:47:05>> LOG> Using SSH protocol version 2 : FTP 1/11/2005 10:47:05>> LOG> Doing Diffie-Hellman group exchange : FTP 1/11/2005 10:47:05>> LOG> Doing Diffie-Hellman key exchange : FTP 1/11/2005 10:47:06>> LOG> Host key : ctx->do_ssh2_transport.fingerprint is: FTP 1/11/2005 10:47:06>> : LOG> ssh-rsa 1024 KEY... : FTP 1/11/2005 10:47:06>> LOG> Initialised AES-256 client->server : encryption : FTP 1/11/2005 10:47:06>> LOG> Initialised AES-256 server->client : encryption : FTP 1/11/2005 10:47:06>> LOG> Keyboard-interactive authentication : refused : FTP 1/11/2005 10:47:06>> LOG> Sent password : FTP 1/11/2005 10:47:07>> LOG> Access granted : FTP 1/11/2005 10:47:07>> LOG> Opened channel for session : FTP 1/11/2005 10:47:07>> LOG> Started a shell/command : FTP 1/11/2005 10:47:07>> LOG> Connected : FTP 1/11/2005 10:47:07>> LOG> /www/ratesheet/ : FTP 1/11/2005 10:47:07>> LOG> /www/ratesheet/ : FTP 1/11/2005 10:47:07>> LOG> www/ratesheet/ : FTP 1/11/2005 10:47:07>> LOG> ww/ratesheet/ : FTP 1/11/2005 10:47:07>> LOG> w/ratesheet/ : FTP 1/11/2005 10:47:07>> LOG> /ratesheet/ : FTP 1/11/2005 10:47:07>> LOG> ratesheet/ : FTP 1/11/2005 10:47:07>> LOG> atesheet/ : FTP 1/11/2005 10:47:07>> LOG> tesheet/ : FTP 1/11/2005 10:47:07>> LOG> esheet/ : FTP 1/11/2005 10:47:07>> LOG> sheet/ : FTP 1/11/2005 10:47:07>> LOG> heet/ : FTP 1/11/2005 10:47:07>> LOG> eet/ : FTP 1/11/2005 10:47:07>> LOG> et/ : FTP 1/11/2005 10:47:07>> LOG> t/ : FTP 1/11/2005 10:47:07>> LOG> / : FTP 1/11/2005 10:47:07>> LOG> Failed to get file : "/www/ratesheet/readme.txt" attributes: no such file or : directory
|
|
Tue Jan 11, 2005 1:11 pm |
|
 |
Tim Benning
Joined: 10 Jan 2005 Posts: 10
|
|
Re: SyncFTPDir, SFTP and Synchronizing Directories |
|
: It looks like the problem is in the destination folder path (target_dir : parameter in SyncFTPDir as it is called in the manual). : How did you enter it? Did you specify relative or absolute path? FTPConfig "FTP PROTOCOL", "SECURE" SyncFTPDir( "LOCAL", "server", "userid", "password", "d:\\apps\\rat\\rat001\\", "/www/ratesheet", True, False, True, True ) I have tried it with and without the trailing /.
|
|
Tue Jan 11, 2005 2:24 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7970
|
|
Re: SyncFTPDir, SFTP and Synchronizing Directories |
|
Try "/home/[user name]/www/ratesheet/" : FTPConfig "FTP PROTOCOL", "SECURE" : SyncFTPDir( "LOCAL", "server", "userid", : "password", "d:\\apps\\rat\\rat001\\", : "/www/ratesheet", True, False, True, True ) : I have tried it with and without the trailing /.
|
|
Tue Jan 11, 2005 3:18 pm |
|
 |
Justin Knash
Joined: 10 Jan 2005 Posts: 3
|
|
Re: SyncFTPDir, SFTP and Synchronizing Directories |
|
That will fail, because the path on the filesystem is "/www/ratesheet". We have tried doing this with a Mac OSX server and a Slackware Linux server, both with the exact same failures. I don't think the path is the issue. Justin : Try "/home/[user name]/www/ratesheet/"
|
|
Tue Jan 11, 2005 3:22 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7970
|
|
Re: SyncFTPDir, SFTP and Synchronizing Directories |
|
Two more questions... 1. does it work for simple FTP file uploads? For example, FTPConfig "FTP PROTOCOL", "SECURE" FTPPutFile "server", "userid", "password", "d:\\apps\\rat\\rat001\\readme.txt", "/www/ratesheet/readme.txt" 2. Does it work for directories? For example, FTPConfig "FTP PROTOCOL", "SECURE" FTPDirCreate "server", "userid", "password", "/www/ratesheet/myfolder" : That will fail, because the path on the filesystem is : "/www/ratesheet". We have tried doing this with a Mac OSX server : and a Slackware Linux server, both with the exact same failures. I don't : think the path is the issue. : Justin
|
|
Tue Jan 11, 2005 3:47 pm |
|
 |
Justin Knash
Joined: 10 Jan 2005 Posts: 3
|
|
Re: SyncFTPDir, SFTP and Synchronizing Directories |
|
Yes, both of those commands completed without any errors. Justin : Two more questions... : 1. does it work for simple FTP file uploads? For example, : FTPConfig "FTP PROTOCOL", "SECURE" : FTPPutFile "server", "userid", "password", : "d:\\apps\\rat\\rat001\\readme.txt", : "/www/ratesheet/readme.txt" : 2. Does it work for directories? For example, : FTPConfig "FTP PROTOCOL", "SECURE" : FTPDirCreate "server", "userid", "password", : "/www/ratesheet/myfolder"
|
|
Tue Jan 11, 2005 4:49 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7970
|
|
Re: SyncFTPDir, SFTP and Synchronizing Directories |
|
Ok, it seems to be a problem with the home path resolution. So far I found out that error 15 comes from 24x7ssh.dll and it returned when the system fails to create new directory. I will research some stuff here and email to you what I found out. : Yes, both of those commands completed without any errors. : Justin
|
|
Tue Jan 11, 2005 5:27 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|