Solved

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

Posted on 2011-02-22
7
357 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
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

Stressed Out?

Watch some penguins on the livecam!

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

734 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