Hello all,
I haven’t done many post (this might be my first) as I’ve nearly always found a way around the problem via searching these forums or google, but this problem has me stuck.
I have a script which prepares a txt file to be uploaded to a transportation company (con note information). They would like up to FTP the file to them and saved into 2 locations
1: “ftp://ftpserver.com.au:20001/one/” 2: “ftp://ftpserver.com.au:20001/one/done/” with a username and password and port 20001. We have been told we have write access only.
I have tried using the following(just a snipet below)
this
property this_URL1 : “ftp://username:password@ftpserver.com.au:20001/one/”
property this_URL2 : “ftp://username:password@ftpserver.com.au:20001/one/done/”
tell application “URL Access Scripting”
upload file this_file to this_URL1 with progress without binhexing and authentication
upload file this_file to this_URL2 with progress without binhexing and authentication
this
set this_URL1 to “ftp://username:password@ftpserver.com.au:20001/one/”
set this_URL2 to “ftp://username:password@ftpserver.com.au:20001/one/done/”
tell application “URL Access Scripting”
upload this_file to this_URL1 with progress without binhexing
upload this_file to this_URL2 with progress without binhexing
and via a shell script base on http://danshockley.com/codebits.php (thx for that Krioni)
All of the above work on the two FTP servers that I have running (one on the LAN (no user or password required) and a remote location (user and password required), but will not work for the transportation company’s FTP server.
The apple event log for the “URL Access Scripting” is
"tell application “URL Access Scripting”
upload file “file location and file name here” to “ftp://username:password@ftpserver.com.au:20001/one/” with progress without binhexing and authentication
→ false
and stops
The error for the shell script is
“simpleFtpUpload FAILED: curl: (9) Couldn’t cd to one”
then stops
I have used TextWangler to save the file to the FTP and it works but when I connect I do get the following error
“The “retrieve” command was rejected by the server (application error code: 22718)”
Now when I use Interarchy to go to the FTP site and copy the file over the log says
220-Companys FTP site
220 For customer access only.
AUTH TLS
502 SSL/TLS authentication not allowed
USER customers
331 Password required for customers
PASS *****
230 Logged on
PWD
257 “/” is current directory.
TYPE A
200 Type set to A
CWD /one
550 CWD failed. “/one”: Permission denied.
CWD /one
550 CWD failed. “/one”: Permission denied.
SIZE /one/connotefile.txt
550 Permission denied
PASV
227 Entering Passive Mode (211,27,241,74,78,36)
STOR /one/connotefile.txt
550 Permission denied
QUIT
Now I see the errors but the file does get there, so I’m think its a permission thing on the FTP server (can’t list dir??)
Is there something I could try, do without using a FTP program as this script goes to a few computer to run so a “URL Access Scripting” or shell command would be better.
The company won’t change any permission options so I’m hoping someone can help me or point me in the right direction.
Model: Dual G5 2.5GHz
AppleScript: Script Debugger 4
Browser: Firefox 1.5.0.6
Operating System: Mac OS X (10.3.9)