Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2011-02-22
7
Medium Priority
?
361 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
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 
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 2000 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

Looking for the Wi-Fi vendor that's right for you?

We know how difficult it can be to evaluate Wi-Fi vendors, so we created this helpful Wi-Fi Buyer's Guide to help you find the Wi-Fi vendor that's right for your business! Download the guide and get started on our checklist today!

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…
BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
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 and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

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