Sponsored Content
Top Forums Shell Programming and Scripting Curl ftp upload success but no file exist on the server !!!! Post 302545063 by laraaj on Saturday 6th of August 2011 06:08:53 AM
Old 08-06-2011
Curl ftp upload success but no file exist on the server !!!!

hello,
I'm trying to upload a file to this ftp server and others ftp://ftp.byethost12.com as you can see in the output of CURL using the -v option
curl reports that the upload succeeded but when i connected to the server with file-zilla there is no file uploaded the same command
upload files to other servers but does work with others although it reports a successful transfer.
Code:
curl --disable-epsv -v -T"/root/backupcfg.tar.bz2" -u"username: password" "ftp://ftp.byethost12.com/New/"
* About to connect() to ftp.byethost12.com port 21 (#0)
*   Trying 209.190.85.253... connected
* Connected to ftp.byethost12.com (209.190.85.253) port 21 (#0)
< 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
< 220-You are user number 53 of 500 allowed.
< 220-Local time is now 13:54. Server port: 21.
< 220-This is a private system - No anonymous login
< 220-IPv6 connections are also welcome on this server.
< 220 You will be disconnected after 2 minutes of inactivity.
> USER b12_5477853
< 331 User b12_5477853 OK. Password required
> PASS password
< 230-Your bandwidth usage is restricted
< 230-User b12_5477853 has group access to:  5477853 
< 230 OK. Current restricted directory is /
> PWD
< 257 "/" is your current location
* Entry path is '/'
> CWD New
< 250 OK. Current directory is /New
> PASV
* Connect data stream passively
< 227 Entering Passive Mode (209,190,85,253,131,23)
*   Trying 209.190.85.253... connected
* Connecting to 209.190.85.253 (209.190.85.253) port 33559
> TYPE I
< 200 TYPE is now 8-bit binary
> STOR backupcfg.tar.bz2
< 150 Accepted data connection
} [data not shown]
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 12444    0     0  100 12444      0    824  0:00:15  0:00:15 --:--:--   824* Remembering we are in dir "New/"
100 12444    0     0  100 12444      0    773  0:00:16  0:00:16 --:--:--     0< 226-File successfully transferred
< 226 1.207 seconds (measured here), 10.07 Kbytes per second
100 12444    0     0  100 12444      0    763  0:00:16  0:00:16 --:--:--     0* Connection #0 to host ftp.byethost12.com left intact

> QUIT
< 221-Goodbye. You uploaded 13 and downloaded 0 kbytes.
< 221 Logout.
* Closing connection #0

any help please.

Last edited by laraaj; 08-06-2011 at 08:12 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

help with curl using ssl to ftp file

Currently I am trying to download a file from a secure site that I do not control. I need to use a pem cert to get past their firewall. Currently I am trying to use curl to get the file and return it using the following information pemcert.txt containing the cert, username, password, domain,... (0 Replies)
Discussion started by: gandolf989
0 Replies

2. Shell Programming and Scripting

ftp put in shell script -- whole file doesn't upload

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)
Discussion started by: Viola
2 Replies

3. Shell Programming and Scripting

Shell Script for Upload/download files using cURL

hi please help me out here, i want to use curl command in shell script to test web pages, what i have is an opening page, when i click on a button on opening page, the next page comes up and then i have to upload a file n then click another button to submit and then comes the output page,... (2 Replies)
Discussion started by: Olivia
2 Replies

4. Shell Programming and Scripting

File upload through curl

hi; I need a script to upload a file using HTTP(curl post) to another system. Will appreciate ur help. Thnks; (0 Replies)
Discussion started by: ajaypadvi
0 Replies

5. UNIX for Dummies Questions & Answers

Shell Imgur upload with curl

Hi imgur(){ $*|convert label:@- png:-|curl -F "image=@-" -F "key=1913b4ac473c692372d108209958fd15" http://api.imgur.com/2/upload.xml|grep -Eo "<original>(.)*</original>" | grep -Eo "http://i.imgur.com/*";}Execute a command, convert output to .png file, upload file to imgur.com, then returning... (10 Replies)
Discussion started by: slashdotweenie
10 Replies

6. Shell Programming and Scripting

Script to upload latest file to other server via FTP

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)
Discussion started by: nbsparks
7 Replies

7. Shell Programming and Scripting

Checking FTP server file exist or not

I am trying to delete old file in ftp server, after transferring new file successfully . but here i am checking both the file available or not using ls command. if both the file available means i need to get file_new and file_old file size as greater than zero. but i am getting only for... (3 Replies)
Discussion started by: elango963
3 Replies

8. Shell Programming and Scripting

Find files and upload to FTP Server

HI, I need a script to find new files that created after 6:00 from /home/ugh /demo/conn /UAT/d01 and upload them into ftp server according to system date: Please help me (1 Reply)
Discussion started by: refra
1 Replies

9. Shell Programming and Scripting

Upload latest file to ftp

Hi, I want to create a script that parses the content of a file (on each line there is a filename with full path containing the latest fiels created on that day) and uploads every file to a ftp location. Any elegant way to do it ? (4 Replies)
Discussion started by: liviusbr
4 Replies

10. Shell Programming and Scripting

Curl - upload multiple attachment arrays to server webpage

The html page of the form data is as below <form name="uploadform" id="uploadform" action="htmlupload.php" enctype="multipart/form-data" method="post"> <table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center"> <tr> <td class="tcat"> Upload Files ... (0 Replies)
Discussion started by: jaango123
0 Replies
FTPD(8) 						      System Manager's Manual							   FTPD(8)

NAME
ftpd, in.ftpd, setup.anonftp - DARPA Internet File Transfer Protocol server SYNOPSIS
ftp stream tcp nowait root /usr/sbin/in.ftpd in.ftpd tcpd ftp /usr/sbin/in.ftpd DESCRIPTION
Ftpd is the DARPA Internet File Transfer Prototocol server process. The server uses the TCP protocol and listens at the port specified in the ``ftp'' service specification; see services(5). The ftp server currently supports the following ftp requests; case is not distinguished. Request Description ABOR abort previous command ACCT specify account (ignored) ALLO allocate storage (vacuously) APPE append to a file CDUP change to parent of current working directory CWD change working directory DELE delete a file HELP give help information LIST give list files in a directory (``ls -lA'') MKD make a directory MODE specify data transfer mode NLST give name list of files in directory (``ls'') NOOP do nothing PASS specify password PASV prepare for server-to-server transfer PORT specify data connection port PWD print the current working directory QUIT terminate session RETR retrieve a file RMD remove a directory RNFR specify rename-from file name RNTO specify rename-to file name STOR store a file STOU store a file with a unique name STRU specify data transfer structure TYPE specify data transfer type USER specify user name XCUP change to parent of current working directory XCWD change working directory XMKD make a directory XPWD print the current working directory XRMD remove a directory The remaining ftp requests specified in Internet RFC 959 are recognized, but not implemented. The ftp server will abort an active file transfer only when the ABOR command is preceded by a Telnet "Interrupt Process" (IP) signal and a Telnet "Synch" signal in the command Telnet stream, as described in Internet RFC 959. Ftpd interprets file names according to the ``globbing'' conventions used by csh(1). This allows users to utilize the metacharacters ``*?[]{}~''. Ftpd authenticates users according to three rules. 1) The user name must be in the password data base, /etc/passwd, and not have a null password. In this case a password must be pro- vided by the client before any file operations may be performed. 2) The user name must not appear in the file /etc/ftpusers. 3) If the user name is ``anonymous'' or ``ftp'', an anonymous ftp account must be present in the password file (user ``ftp''). In this case the user is allowed to log in by specifying any password (by convention this is given as the client host's name). In the last case, ftpd takes special measures to restrict the client's access privileges. The server performs a chroot(2) command to the home directory of the ``ftp'' user. In order that system security is not breached, it is recommended that the ``ftp'' subtree be con- structed with care; the following rules are recommended. ~ftp) Make the home directory owned by ``ftp'' and unwritable by anyone. ~ftp/bin) Make this directory owned by the super-user and unwritable by anyone. The program ls(1) must be present to support the list com- mands. This program should have mode 111. ~ftp/etc) Make this directory owned by the super-user and unwritable by anyone. The files passwd(5) and group(5) must be present for the ls command to work properly. These files should be mode 444. ~ftp/pub) Make this directory mode 755 and owned by the super-user. Create directories in it owned by users if those users want to manage an anonymous ftp directory. ~ftp/pub/incoming) Optionally create this directory for anonymous uploads. Make it mode 777. The FTP daemon will create files with mode 266, so remote users can write a file, but only local users can do something with it. The script setup.anonftp can be used to create or check an anonymous FTP tree. SEE ALSO
ftp(1). BUGS
The anonymous account is inherently dangerous and should avoided when possible. FTPD(8)
All times are GMT -4. The time now is 03:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy