Solved

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

Posted on 2011-02-22
7
348 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:Dushan911
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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 17

Expert Comment

by:Dushan911
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:
Dushan911 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
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…
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…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

863 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

24 Experts available now in Live!

Get 1:1 Help Now