Solved

Linux: how to establish an FTP connection to an account with specific directory

Posted on 2011-02-22
7
355 Views
Last Modified: 2012-05-11
I am building a PHP application which uploads a file to a client's server.

The client provided the following account. I am able to connect to the FTP server if I enter the URL and credentials into my browser. However, I am unable to connect to the FTP server if I try connecting from the linux command line:

SERVER: ftp://client.server.com/uploaddirectory/ 
USER: user123
PASS: xyz456

I can't run "ftp ftp://client.server.com/uploaddirectory/ " and when I try connecting to "ftp client.server.com" my password is rejected.

I am simply trying to establish a connection in the code to upload a text file to "/uploaddirectory/".

Will this account work or do I need the client to change things on their end?

0
Comment
Question by:bearclaws75
  • 4
  • 3
7 Comments
 

Author Comment

by:bearclaws75
ID: 34957308
The ftp output is below. I am changing the actual server/user/pass for security reasons.
[root@dev scripts]# ftp client.server.com
Connected to client.server.com (123.123.123.12).
220---------- Welcome to Pure-FTPd [TLS] ----------
220-You are user number 3 of 50 allowed.
220-Local time is now 17:03. 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 15 minutes of inactivity.
Name (client.server.com:root): user123
331 User user123OK. Password required
Password:
530 Login authentication failed
Login failed.

Open in new window

0
 
LVL 17

Expert Comment

by:Dushan De Silva
ID: 34957324
try following command from command lines post us the output of pwd command.
ftp
open 123.123.123.12
user123
xyz456
pwd
0
 

Author Comment

by:bearclaws75
ID: 34957442
I get the same error message with the addition of these lines:

530 Login authentication failed
Login failed.
Remote system type is UNIX.
Using binary mode to transfer files.
0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
LVL 17

Expert Comment

by:Dushan De Silva
ID: 34957487
On the Browser are you entering http://client.server.com/uploaddirectory/ 
or ftp://client.server.com/uploaddirectory/ ?

If ftp://... is working on browser this may be a firewall issue on the ftp client side you are trying..
0
 

Author Comment

by:bearclaws75
ID: 34957979
Yes - ftp://client.server.com/uploaddirectory/ works fine.

I don't have any trouble connecting to other FTP servers from my server. Do you mean the issue might be a firewall issue on the the client's FTP server?
0
 
LVL 17

Accepted Solution

by:
Dushan De Silva earned 500 total points
ID: 34957994
Nope on your node which is using to access their ftp server as a client. Check your firewall settings ( defaults ftp ports is 21).
0
 

Author Closing Comment

by:bearclaws75
ID: 34988604
The client provided a new FTP account and everything is working. Wish I could post a specific solution but they didn't provide any troubleshooting info. I'll award Dushan911 points for sticking with question. Thanks!
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hello EE, Today we will learn how to send all your network traffic through Tor which is useful to get around censorship and being tracked all together to a certain degree. This article assumes you will be using Linux, have a minimal knowledge of …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question