I copy/pasted your code snippet into a new bash script, changed the username, password, testfile, and FTP server, then it ran just fine.
Try changing the first line to:
You can get a better idea of where it's failing.
You can't put a "sleep" between the "<<EOD" and "EOD" since FTP doesn't understand that command.
If you're missing bytes, you probably need to issue a "bin" (binary) command prior to your "put", otherwise the end-of-line character can get affected. FTP transfers over ASCII mode by default.
Also, the FTP "put" command with a single argument implies the location of the local file is the same as the remote file, so if you do this:
You are telling FTP to upload the local file /path/to/file.txt to the FTP's remote directory /path/to/, which may not exist. Perhaps you mean to do this:
Hi!
I'd like to upload a complete folder with subfolders with put. At the moment I always get the err-msg:
aboutme: not a plain file
Could anyone help me??
Thanx (3 Replies)
I have a ftp server up , however when I upload a file from my desktop to the server I get this message:
ftp> get uploadtest.txt
Local: uploadtest.txt Remote: uploadtest.txt
227 passive Mode ( 192,168,0,1,190,75)
550 Failed to open file
ftp> (3 Replies)
Hi
I'm having some trouble with a bash shell script that I'm writing. In the script, I'm trying to upload a file to a backup repository using ftp, but the whole file doesn't get uploaded.
This is the file's properties at the start (I've highlighted the file size in red):
-rw-r--r-- 1 root... (2 Replies)
Hi everyone!
I'm in a need of a shell script that search for all files in a folder, move all those files to a temp folder, and upload those files via FTP. When the file transfer via FTP completes successfully, the file is moved to a completed folder. In case any of those files fails, the file... (4 Replies)
Hi All,
I am new to this forum and i need help from you .
Here i want to get a mail conformation when ever the file was uploaded to FTP server.Here is my FTP script . Can any one plz help me how to get a mail confirmation weather the file was uploaded or not.
#!bin/sh
HOST='192.168.2.85'... (4 Replies)
Can any one help in writing FTP upload script using bash ..
with specific port
-oPort=62022
#/bin/bash
FTPU="username" # ftp login name
FTPP="password" # ftp password
FTPS="localhost.com" # remote ftp server
FTPF="/test" # remote ftp server directory for $FTPU & $FTPP
port="2345"... (3 Replies)
Hello,
I have a script that finds the latest version of a file in a folder on my Minecraft server. I'm trying to come up with something that will then FTP that file over to my fileserver.
Here's what I have that finds the newest file:
find /home/mc/archive/sbhouse -type f -mtime +45 -exec... (7 Replies)
Hi,
Im a newbie with programming and shell scripting. Im running OSX/Mac and Darwin.
I would like to create a shell script that would :
1. Search a Volume and directory (including subdirectories) for a file that :
* filename ends with ”_Highres.pdf” and
* the file creation date of... (8 Replies)
Hi,
I have one FTP script which simply sends the file to target server via netrc.it used to work as normal for years.recently target server IP got changed , same has been updated in .netrc but unable to connect it via FTP though netwrk guys already opened the port 21,20 and 22 .
NETRC... (7 Replies)
I am trying to upload a file to the server using bash script in html form.
<FORM NAME="FORM1" METHOD="post" enctype="multipart/form-data" ACTION="/cgi-bin/UPLOAD.sh">
<INPUT type="file" name="DOCFILE" id="DOCFILE"
accept=".jpg,.tif,.pdf">
</FORM>
How can I able to access the file in... (8 Replies)