Solved

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

Posted on 2011-02-22
7
347 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
Comment Utility
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:Dushan911
Comment Utility
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
Comment Utility
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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 17

Expert Comment

by:Dushan911
Comment Utility
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
Comment Utility
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:
Dushan911 earned 500 total points
Comment Utility
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
Comment Utility
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

Easy Project Management (No User Manual Required)

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

​Being a Managed Services Provider (MSP) has presented you  with challenges in the past— and by meeting those challenges you’ve reaped the rewards of success.  In 2014, challenges and rewards remain; but as the Internet and business environment evol…
This article discusses four methods for overlaying images in a container on a web page
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…
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 …

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now