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(8c)																  ftpd(8c)

Name
       ftpd - DARPA Internet File Transfer Protocol server

Syntax
       /usr/etc/ftpd [ -d ] [ -l ] [ -ttimeout ]

Description
       The  server  is	the  DARPA  Internet  File  Transfer  Protocol server process.	The server uses the TCP protocol and is invoked by when it
       receives a connection on the port specified in the service specification.  For further information, see

       The server currently supports the following requests.  Case is not distinguished.

       Request	Description

       ABOR	 Abort previous command

       ACCT	 Specify account

       ALLO	 Allocate storage

       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 of files in a directory (ls -lg)

       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 requests specified in Internet RFC 959 are recognized, but not implemented.

       The server interprets file names according to the globbing conventions used by This allows users to utilize the metacharacters *?[]{}~.

       The server authenticates users according to three rules:

       1.   The user name must be in the password database, and not have a null password.  In this case a password must be provided by the  client
	    before any file operations may be performed.

       2.   The user name must not appear in the file

       3.   If	the  user  name  is  anonymous	or an anonymous 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, takes special measures to restrict the client's access privileges.  The server performs a command to the  home  directory
       of the user. To prevent system security from being breached, it is recommended that the subtree be constructed with care.  Thus the follow-
       ing rules are recommended:

       ~ftp)	 Make the home directory owned by and unwritable by anyone.

       ~ftp/bin) Make this directory owned by the superuser and unwritable by anyone.  The program must be present to support the  list  commands.
		 This program should have mode 111.

       ~ftp/etc) Make this directory owned by the superuser and unwritable by anyone.  The files and must be present for the command to work prop-
		 erly.	These files should be mode 444.

       ~ftp/pub) Make this directory mode 777 and owned by Place the files, which are to be accessible by the anonymous account,  in  this  direc-
		 tory.

Options
       -d   Enables certain debugging messages that are printed by ftpd.

       -l   Logs each ftp session to the

       -t   Sends the inactivity timeout period to timeout; otherwise, the server will timeout an inactive session after 15 minutes.

Restrictions
       Support does not exist for aborting commands.

       The use of an anonymous account is inherently dangerous and should be avoided when possible.

       The  server  must  run  as  the superuser to create sockets with privileged port numbers.  The server maintains an effective user id of the
       logged in user, reverting to the superuser only when binding addresses to sockets.  The possible security holes have been extensively scru-
       tinized, but are possibly incomplete.

Files
       Contains the list of unauthorized users

See Also
       ftp(1c), services(5), inetd(8c), syslog(8)

																	  ftpd(8c)
All times are GMT -4. The time now is 07:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy