Network Automation Software We are currently migrating this forum
over to our HelpSystems domain. Please
post all new threads in our new
HelpSystems Community Portal.
Post to the HelpSystems Forum
You are not currently logged on. You must be logged on in order to post. Log on
Or Create a new account
AutoMate Discussion
Decrease font size
Increase font size
Topic Title: SFTP
Topic Summary: Uploading to SFTP
Created On: 01/15/2008 08:25 AM
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
View similar topics View similar topics
View topic in raw text format. Print this topic.
 01/15/2008 08:25 AM
User is offline View Users Profile Print this message

Author Icon
KristopherKearley
Student (5-19 posts)

Posts: 7
Joined: 12/28/2007

Trying to upload files to an SFTP server and the server does not allow me to copy files to it if i try to preserve the modified date attribute of the file.  Is there a way to disable this function so that when it copies the file to the server the file acquires a new modified date of the when it was copied to the server?



 Category Survey
 01/15/2008 09:23 AM
User is offline View Users Profile Print this message

Author Icon
Ronak Patel
AUTOMATE EMPLOYEE

Posts: 967
Joined: 07/20/2006

Hi KristopherKearley,

Can you eloborate more on your scenario?

Do you want your File to change its modified date to the date when you upload it to FTP Server(basically Automate Client should update the modified date when it uploads the file from local machine to ftp server)?

 Category Survey


-------------------------
// Ronak Patel,
// Automate Development Team
// Network Automation, Inc. - No Code, No Limits Business Process Automation

Edited: 01/15/2008 at 09:23 AM by Ronak Patel
 01/15/2008 09:38 AM
User is offline View Users Profile Print this message

Author Icon
KristopherKearley
Student (5-19 posts)

Posts: 7
Joined: 12/28/2007

Don't know if it's necessarily changing the modified date that is needed as it is trying to keep the software from preventing the change of the modified date.  I believe the way it would work is that the server would change the modified date to the current date and won't allow files to be copied if it's not able to change the modified date of the files which would occur if the software was trying to force the preservation of the original modified date attribute.  The forcing of the preservation of the original modified date attribute is the feature i want to disable if possible so that the server will allow me to upload files to it.

Does that make things a little more clear?



 Category Survey
 01/15/2008 11:35 AM
User is offline View Users Profile Print this message

Author Icon
Ronak Patel
AUTOMATE EMPLOYEE

Posts: 967
Joined: 07/20/2006

Hi KristopherKearley,

Thanks for more information in this case.The SFTP specification doesn't define, whether the server must update the date of the file being uploaded (if such file exists before uploading). So it's server-dependent. Automate Client does not have to do anything with Modified date of file. It will upload the file as it is. Then it is up to SFTP Server to Change its Modified Date. Does your Server Log shows any error regarding this?

 Category Survey


-------------------------
// Ronak Patel,
// Automate Development Team
// Network Automation, Inc. - No Code, No Limits Business Process Automation

Edited: 01/15/2008 at 11:35 AM by Ronak Patel
 01/15/2008 12:15 PM
User is offline View Users Profile Print this message

Author Icon
KristopherKearley
Student (5-19 posts)

Posts: 7
Joined: 12/28/2007

The log for the SFTP task that i built only shows the connection to the server and does not show the error that occurs when I try to upload a file to the server. Though in the output tab i get the following messages when I run my task:
(Step 0) Task Started.
(Step 2) Starting FTP Log On action...
(Step 2) Logging on to ftp server. Session "FTPSession" started.
(Step 2) Finished FTP Log On action.
(Step 3) Starting FTP Upload action...
(Step 3) Total File(s) Found : 1
(Step 3) Uploading file "\\nas02\solarfiles\jax\docs\wc documen\WC DOCUMENTATION 01-15-08 02-44-33 PM.tif" to "/jax"...
(Step 3) FTP Error : Permission Denied!
(Step 3) Finished FTP Upload action.
(Step 3) Task Ended.

Now i know that i can upload to this server without any problems if i use a freeware program called WinSCP3 and i disable the "Preserve Timestamp" preference option.  Does Automate not have a script command or check box that i can use to disable the option just like this application does?



 Category Survey
 01/15/2008 01:15 PM
User is offline View Users Profile Print this message

Author Icon
Ronak Patel
AUTOMATE EMPLOYEE

Posts: 967
Joined: 07/20/2006

Hi KristopherKearley,

Looks like you are uploading a file from Shared Location. Can you please try to upload a file from your Hard Drive and let us know if you can reproduce the same problem.

 Category Survey


-------------------------
// Ronak Patel,
// Automate Development Team
// Network Automation, Inc. - No Code, No Limits Business Process Automation

Edited: 01/15/2008 at 01:15 PM by Ronak Patel
 01/15/2008 01:47 PM
User is offline View Users Profile Print this message

Author Icon
KristopherKearley
Student (5-19 posts)

Posts: 7
Joined: 12/28/2007

(Step 3) Task Started.
(Step 2) Starting FTP Log On action...
(Step 2) Logging on to ftp server. Session "FTPSession" started.
(Step 2) Finished FTP Log On action.
(Step 4) Starting FTP Upload action...
(Step 4) Total File(s) Found : 1
(Step 4) Uploading file "C:\Documents and Settings\kriskearley\My Documents\UploadTest.txt" to "/jax"...
(Step 4) FTP Error : Permission Denied!
(Step 4) Finished FTP Upload action.
(Step 4) Task Ended.

And this is all that's in the log that's created:
------------------------------------------------------------------------
Date : 1/15/2008 4:48:12 PM
------------------------------------------------------------------------
Connecting to SERVER connection type is sftp
Server key ******* received
Authentication succeeded



 Category Survey
 01/15/2008 03:31 PM
User is offline View Users Profile Print this message

Author Icon
Ronak Patel
AUTOMATE EMPLOYEE

Posts: 967
Joined: 07/20/2006

Hi KristopherKearley

It looks like you are trying to upload to a location to which you don't have access rights.
Can you please attach your task file in your next response?

 Category Survey


-------------------------
// Ronak Patel,
// Automate Development Team
// Network Automation, Inc. - No Code, No Limits Business Process Automation
 01/16/2008 05:18 AM
User is offline View Users Profile Print this message

Author Icon
KristopherKearley
Student (5-19 posts)

Posts: 7
Joined: 12/28/2007

Like I've stated in one of my previous posts, I can use another ftp application and upload to the server without any problems.  By default it seems that ftp applications try to preserve the timestamp of a file that is being uploaded.  This application that i'm currently using allows the user to disable that function.  The reason i'm not able to upload is because the server won't let me copy files and the timestamp attribute of the file.  If there is a way you can set automate to copy to a server and copy everything but the timestamp of the file then i'll be able to copy to the server.  Is there away to do this either through a preference option or script command in the ftp advanced feature?



 Category Survey
 01/16/2008 12:05 PM
User is offline View Users Profile Print this message

Author Icon
Marjo Martinez
HelpSystems

Posts: 1041
Joined: 08/07/2005

Kristopher,

Please provide the name of the FTP client you are currently using that allows the disabling of timestamp attributes upon upload so that we can properly run some tests on our end. Is it possible that the FTP client is sending a specific command to the server as opposed to actually disabling timestamp value? If so, you can check the client FTP log to determine what command was sent then use the 'FTP Advanced' action to send that command.

 Category Survey


-------------------------
Thank you for choosing AutoMate.

Marjo

<a class="ftalternatingbarlinklarge" href="http://www.networkautomation.com" target="_blank">Network Automation, Inc. - No Code, No Limits Business Process Automation</A>
 01/16/2008 01:08 PM
User is offline View Users Profile Print this message

Author Icon
KristopherKearley
Student (5-19 posts)

Posts: 7
Joined: 12/28/2007

I'm currently using WinSCP3.  You can get it here, http://winscp.net/eng/index.php.

Here is part of my log file:
. 2008-01-15 22:42:10.202 File: "WC AUTHORIZATION FORM 01-15-08 06-08-16 PM.tif"
. 2008-01-15 22:42:10.202 Copying "WC AUTHORIZATION FORM 01-15-08 06-08-16 PM.tif" to remote directory started.
. 2008-01-15 22:42:10.202 Binary transfer mode selected.
. 2008-01-15 22:42:10.202 Checking existence of file.
> 2008-01-15 22:42:10.202 Type: SSH_FXP_LSTAT, Size: 86, Number: 2159111
< 2008-01-15 22:42:10.233 Type: SSH_FXP_STATUS, Size: 106, Number: 2159111
< 2008-01-15 22:42:10.233 Status/error code: 2
. 2008-01-15 22:42:10.233 Checking existence of partially transfered file.
> 2008-01-15 22:42:10.233 Type: SSH_FXP_LSTAT, Size: 95, Number: 2159367
< 2008-01-15 22:42:10.249 Type: SSH_FXP_STATUS, Size: 115, Number: 2159367
< 2008-01-15 22:42:10.249 Status/error code: 2
. 2008-01-15 22:42:10.249 Opening remote file.
> 2008-01-15 22:42:10.249 Type: SSH_FXP_OPEN, Size: 108, Number: 2159619
< 2008-01-15 22:42:10.280 Type: SSH_FXP_HANDLE, Size: 10, Number: 2159619
> 2008-01-15 22:42:10.280 Type: SSH_FXP_WRITE, Size: 29996, Number: 2160134
. 2008-01-15 22:42:10.967 13 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
> 2008-01-15 22:42:10.967 Type: SSH_FXP_CLOSE, Size: 10, Number: 2162180
< 2008-01-15 22:42:10.967 Type: SSH_FXP_STATUS, Size: 17, Number: 2161670
< 2008-01-15 22:42:10.999 Type: SSH_FXP_STATUS, Size: 17, Number: 2161926
< 2008-01-15 22:42:11.186 Type: SSH_FXP_STATUS, Size: 17, Number: 2162180
< 2008-01-15 22:42:11.186 Status/error code: 0
> 2008-01-15 22:42:11.186 Type: SSH_FXP_RENAME, Size: 168, Number: 2162450
< 2008-01-15 22:42:11.233 Type: SSH_FXP_STATUS, Size: 17, Number: 2162450
< 2008-01-15 22:42:11.233 Status/error code: 0
> 2008-01-15 22:42:11.233 Type: SSH_FXP_SETSTAT, Size: 103, Number: 2159881
< 2008-01-15 22:42:11.249 Type: SSH_FXP_STATUS, Size: 44, Number: 2159881
< 2008-01-15 22:42:11.249 Status/error code: 8, Message: 2159881, Server: SSHServerAPI.SFTP.fxp_attrs, Language:
* 2008-01-15 22:42:11.249 (ETerminal) The server does not support the operation.
* 2008-01-15 22:42:11.249 Error code: 8
* 2008-01-15 22:42:11.249 Error message from server: SSHServerAPI.SFTP.fxp_attrs
* 2008-01-15 22:42:11.249 Request code: 9
. 2008-01-15 22:42:11.249 Asking user:
. 2008-01-15 22:42:11.249 Upload of file 'WC AUTHORIZATION FORM 01-15-08 06-08-16 PM.tif' was successful, but error occurred while setting the permissions and/or timestamp. If the problem persists, turn on 'Ignore permission errors' option. ("The server does not support the operation.

Regardless of the errors that i receive the files do actually copy over to the server.

Hopefully this helps you help me



 Category Survey
 01/17/2008 08:50 AM
User is offline View Users Profile Print this message

Author Icon
Ronak Patel
AUTOMATE EMPLOYEE

Posts: 967
Joined: 07/20/2006

Hi KristopherKearley,

We also need the Name of the SFTP Server, Its Version and Logs from the Server for the same uploading file you have posted.

 Category Survey


-------------------------
// Ronak Patel,
// Automate Development Team
// Network Automation, Inc. - No Code, No Limits Business Process Automation
 01/17/2008 09:06 AM
User is offline View Users Profile Print this message

Author Icon
KristopherKearley
Student (5-19 posts)

Posts: 7
Joined: 12/28/2007

I don't understand why you need this information.  All i want to know is if the Automate application has the ability to upload files and not force the preservation of the modified date.  How will the logs, version, and server name help you figure out if the application has this functionality?

I've contacted the company for this information you've requested but I would still like to have a better understanding of why this information is needed.



 Category Survey


Edited: 01/17/2008 at 09:09 AM by KristopherKearley
 01/17/2008 09:15 AM
User is offline View Users Profile Print this message

Author Icon
Ronak Patel
AUTOMATE EMPLOYEE

Posts: 967
Joined: 07/20/2006

Hi KristopherKearley,

When uploading files, Automate BPA does not deal with dates at all -- it just tells server to open the remote file and put the data to it. It's server who changes (or does not change) the modification date of the uploaded file. From your log I see that WinSCP uploads the file with different name and then attempts to change the names of the files in order to overwrite the existing file.

As far as I understand, the text you have posted is the log created by WinSCP, not by the server. But we need a log of the server to be able to clarify the reason for the problem. I'm not sure that Automate BPA's upload failure is caused by an unsuccessful attempt of setting modification time attribute (as Automate does not set it). Also, there is no option in Automate FTP Client to do that.

 Category Survey


-------------------------
// Ronak Patel,
// Automate Development Team
// Network Automation, Inc. - No Code, No Limits Business Process Automation

Edited: 01/17/2008 at 09:15 AM by Ronak Patel
 04/03/2014 12:51 PM
User is offline View Users Profile Print this message

Author Icon
TomGriffiths
Student (5-19 posts)

Posts: 16
Joined: 06/15/2011

Hello,

Did this issue ever get resolved? I am having a similar problem.

Thanks,
Tom Griffiths

 Category Survey
 04/10/2014 02:25 PM
User is offline View Users Profile Print this message

Author Icon
Ricardo Castaneda
HelpSystems

Posts: 3424
Joined: 01/11/2008

Hi Tom,

Can you confirm that you are running version 7. In version 9 we have added a check box for "Preserve date and time".

 Category Survey
AutoMate BPA Server 7 version:
Windows version:


-------------------------

Ricardo Castaneda | Principal Support Analyst
AutoMate | Division of HelpSystems
HelpSystems, LLC | T: +1.213.738.1700
Statistics
18258 users are registered to the AutoMate Discussion forum.
There are currently 0 users logged in.
The most users ever online was 5551 on 01/08/2018 at 11:11 AM.
There are currently 1591 guests browsing this forum, which makes a total of 1591 users using this forum.

FuseTalk Enterprise Edition v4.0 - © 1999-2020 FuseTalk Inc. All rights reserved.

Sitemap Network Automation Software Blog