1

I had to transfer a few videos and photoes on a FTP server.

For that, the person on the remote machine gave me the IP address of that machine where I had to transfer. He told me to transfer by FTP. And he provided me with username and password for the same.

He was expecting that I have Windows OS here locally and so he told me how to install a FTP application on my local box. But actually I have Ubuntu13.04 here.

Now, I opened a terminal and typed ftp and then the IP address of the remote box. I got connected without being prompted for the username and password. Then I transferred the files via FTP.

Two days later, I ftped to that machine I was able to see the files that I had transferred. But, the remote user told me he didn't receive any!

Till now I was thinking that it's his mistake that he hasn't checked properly his machine because I was 100 % sure that the files are in his system as I had confirmed earlier by doing FTP to that machine.

It occurred to me today that he may also be right and the issue is that he is not seeing the files may be something related to the username and password that he had sent me.

As I didn't use his username (the one he provided me) to log in via FTP, is that the reason that he was expecting the file to be uploaded at a particular location that is different than the location where I transferred? In other words, are the files uploaded on location depending on the username I have used, i.e., the location is dependent on the username?

If so, then how to use ftp specifying a particular username?

  • @jasonwryan I thank you for editing my post. It's better and clear to read now. – Ravi Oct 4 '13 at 8:02
1

It seems that the FTP server allows anonymous FTP: FTP where the username is conventionally anonymous and every password is accepted. Your FTP client tried an anonymous FTP login, and this succeeded. The files are in whatever directory is the default directory for anonymous users; this is determined by the FTP server configuration.

Anonymous FTP is commonly used for public download sites. Allowing uploads for anonymous users is a lot less common and risks having the site used for malware distribution. You should recommend that the server owner disables anonymous FTP or at least disables uploads for anonymous users.

Here are some ways to log in with your user name and password instead of trying to log in anonymously. Some ways don't work with all FTP clients.

  • Create a .netrc file in your home directory containing the line

    machine server.example.com login ravi
    
  • Run ftp ravi@server.example.com or ftp ftp://ravi@server.example.com/ to log in as user ravi.

  • Run ftp -n option to disable automatic login for this session.

-1

Read manpage, please man 1 ftp.

There you will find option -n

  • Please don't withhold 90% of the answer. Don't just tell people “read the manual”, especially when the answer is not at all obvious even with the manual. How does the -n option help? (Yes, I see how it helps, but it does not follow from your answer.) – Gilles Oct 5 '13 at 1:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.