ftp dir and pwd commands


 
Thread Tools Search this Thread
Special Forums IP Networking ftp dir and pwd commands
# 1  
Old 12-06-2007
Question ftp dir and pwd commands

Hi,

I have a conenction to remote server that I'm sending files too via FTP.

The problem I have is that when the file gets delivered it is 0 (zero) size.

I've manually connected and logged on. The only command I can successfully execute is pwd. When I do a dir or a put command it will hang until the connection times out.

I have tried extending the time, ensured the permissions are set and that there is disk space. Any ideas how I can write a zero length file, list the path but not be able to put a full file or list the directory? Smilie

Thanks in advance
# 2  
Old 12-06-2007
Sounds like an issue on the FTP side, something is not setup properly, since you cannot execute simple commands. What is the FTP implementation and the OS ?
# 3  
Old 12-06-2007
Isn't ftp setup to encode the transmission to ASCII? Try send this as a binary file - that is more thorough.
ftp> bin
# 4  
Old 12-06-2007
Hi,

We now have a number of feeds that are being affected???? going to various OS types (Windows, SUN, HP) at various hosting sites.

I'm thinking that there may be a firewall issue on the return leg (maybe Smilie ) that is rejecting the return packets (again maybe not 100% sure how the ftp protocol works).


If I issue a "put" command does the recieving end issue an accept packet before we transfer data? if it does then how is it possible to issue a pwd and get a response????

Cheers and beers
# 5  
Old 12-06-2007
Try to use ftp with "-v" option.
It gives the full details and try to find out what went wrong.
# 6  
Old 12-07-2007
Yes you are right. As FTP control and data connections are different it is possible that firewall is not doing FTP "specific" NAT/Proxy.
In such cases working in "passive" mode FTP helps.
Before tranmission just type "passive" command on ftp> prompt
# 7  
Old 12-13-2007
sounds like a data connection problem. when you try to upload a file, a few things happen.

1. server creates empty file if it does not exist on server

2. server opens data port to receive file transfer.

3. data received is saved to file opened in step 1.

based on your description it sounds like step 1 is completing, hence not a permissions issue. However the server is unable to receive data from the client. This is likely a firewall issue (client side if using non-passive/ server side if using passive) or a server configuration issue e.g. server is listening for passive connections on internal IP instead of external IP (common mistake). A debug log of your FTP session would help to answer the question. Use "-v" option as mentioned previously.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Ftp login commands

Hello, I am using ftp on command line. The problem is getting bumped off after 15 minutes of no activity.. I have two options: quit ftp and use the command history of my shell, or stay in ftp and use 'open' command, where I can use the command history saved in the ftp program. Either option... (1 Reply)
Discussion started by: Allasso
1 Replies

2. Shell Programming and Scripting

Using DIR command in FTP

Hi, Can the below command will be working in FTP dir */*/*/*.zip I want to dynamically know the folder names where the zipfiles are present. Thnx in advance. (1 Reply)
Discussion started by: weknowd
1 Replies

3. AIX

sync samba pwd with aix5.3 pwd

currently, my samba login works just fine. i want my clients to use aix5.3 account to login to samba so they don't have to change samba pwd and aix pwd. i googled, and vi /usr/lib/smb.conf per some of knowledge base, but i could not get to work. aix5.3 and samba 3.0.24.0 thanks in advace..... (2 Replies)
Discussion started by: tjmannonline
2 Replies

4. UNIX for Dummies Questions & Answers

Copying dir (and sub dir) file names from ftp server to txt file in diff server

Hey all, i want to copy only the file names from an ftp server (directory and all sub directory) to a text file in another server (non ftp), i.e. i want to recursively move through directories and copy only the names to a text file. any help is appreciated...thank you in advance (1 Reply)
Discussion started by: deking
1 Replies

5. Solaris

How to change pwd during logging on ftp server?

Dear All, Could I change password while login in to ftp server(solaris 10)? I tried to use fileZilla and command prompt(window) to change my password but It can't. Do you have any suggestion ? Ps. I can't telnet and ssh to the server because of poicy for ftpuser. Thank in advance (3 Replies)
Discussion started by: unitipon
3 Replies

6. UNIX for Advanced & Expert Users

echo ${PWD#${PWD%/*/*}/}

Can anyone explain this in detail ... echo ${PWD#${PWD%/*/*}/} Thanks in Advance (1 Reply)
Discussion started by: sakthi.abdullah
1 Replies

7. Shell Programming and Scripting

pwd & cd commands not working in shell script

Here is my script #!/bin/bash pwd cd /var/lib/pgsql Both "pwd" and "cd" are not executed is there any other way i can change the current working directory to /var/lib/pgsql pls help! (9 Replies)
Discussion started by: perk_bud
9 Replies

8. UNIX for Dummies Questions & Answers

Setting up FTP access to my Tomcat Dir

Hi Guys, Im trying to set up FTP to my Apache Tomcat dir on my server so my web designer can FTP in and look at things in a live environment. However at first I couldn't write to the dir, so i change some permissions, and now I cant access it at all! Here is my LS -all output: ... (4 Replies)
Discussion started by: boarderstu
4 Replies

9. IP Networking

Enable PWD command on anonymous FTP?

Hello everyone - First post here, I'm trying to connect to an anonymous ftp server and I am told by the server admin that I cannot have access to the "print working directory" command. I need to have access to this command in order for my (and my clients) preferred ftp client to connect. (the... (9 Replies)
Discussion started by: HiredGun79
9 Replies

10. UNIX for Advanced & Expert Users

FTP a dir

What is the command needed to FTP a full dir including sub folders and files, at unix command line level, (4 Replies)
Discussion started by: shansen
4 Replies
Login or Register to Ask a Question