Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am using centOS 7 two machines under VMWARE. Both the virtual machines are pinging each other. ( network is Ok.) I have installed ftp software on both machines using command "yum install ftp." I am logging in both machines as root
having super user rights. ( naturally ).
But when I try to use command
# ftp < IP address of other virtual machine>, it gets connected and i am asked the password of other machine. ( i.e. root password, since i am logging as a root). When i give password , the message i get is PERMISSION DENIED.
I must be doing some silly mistake. I am typing correct password of root account of the other machine. Then why i am not able to log in on other machine to use file transfer through ftp?? Pl. help.
Which distro, including version, is the host on which you are running VMware? And what is your specific use-case for attempting to resurrect the retro computing protocol FTP?
If you are looking for anonymous downloads, then HTTP/HTTPS is usually the best way to go. Nginx or Apache2 can provide that. If you need login-based uploads and downloads, then SFTP is the way to go. OpenSSH-server can provide that.
Your main problem is that ftp is a client-server protocol. You need to load the ftp server on at least one if them to transfer files. CentOS provides vsftp for this. (yum install vsftpd)
Turbocapitalist is correct in that ftp is old, and insecure. But if these are only in your local network, and for training or some other purpose, you can set up the ftp server on one, and transfer files to/from the other server from that one.
For the record, you'll also have to modify your firewall rules, and enable root for vsftp (it's off by default for security) Or create a local user to use for ftp.
Hello,
I am using centOS 7 two machines under VMWARE. Both the virtual machines are pinging each other. ( network is Ok.) I have installed ftp software on both machines using command "yum install ftp." I am logging in both machines as root having super user rights. ( naturally ).
But when I try to use command
# ftp < IP address of other virtual machine>, it gets connected and i am asked the password of other machine. ( i.e. root password, since i am logging as a root). When i give password , the message i get is PERMISSION DENIED.
I must be doing some silly mistake. I am typing correct password of root account of the other machine. Then why i am not able to log in on other machine to use file transfer through ftp?? Pl. help.
Two 'silly mistakes' are obvious; bolded them both for emphasis.
FTP? In 2022?? Why? Either SSH (which gives you sftp and scp) both work much better, and are much safer, along with already being installed/configured on your system (most likely), or HTTP/HTTPS can be used.
Logging in as root?? 'Naturally'??? That is a HORRIBLE idea, for a host of reasons.
More than likely, root is disabled for security reasons...have you tried another user ID?
ftp < IP address of other virtual machine>, it gets connected and i am asked the password of other machine. ( i.e. root password, since i am logging as a root). When i give password , the message i get is PERMISSION DENIED.
That would mean a FTP server is running, however it depends on which one i.e vsftpd, ProFTPd etc. It is possible to secure FTP using SSL/TLS but sftp should installed and already configured. Regardless root login should be disabled.
Another quick and easy way to transfer files (securely) is rsync, which uses the ssh protocol for security.
As has been mentioned using root is extremely dangerous for your purpose and it is likely that even if A) the firewall allows an ftp connection, and B) the ftp server is accepting connections, you will not be able to connect because by default the ftp server does not ever allow connections as root.
By default none of the other protocols for file transfer allow connections as root either for security reasons.
Please read up on what transfer protocols are in use currently and how to configure the tool of choice for your use case.
I would suggest you try it as a normal user. Of course the user has to exist on the other side. I would think the ftp server would block root. Using root is a bad idea anyway. Nothing wrong with ftp on a local network contrary to the nay-sayers. We used it a lot back when. That said, sftp is better of course and the commands are exactly the same. sftp in available in Raspberry PI land by default and I use it all the time when working at the command line to transfer files back and forth from my desktops to the headless RPIs.
I would suggest you try it as a normal user. Of course the user has to exist on the other side. I would think the ftp server would block root. Using root is a bad idea anyway. Nothing wrong with ftp on a local network contrary to the nay-sayers. We used it a lot back when. That said, sftp is better of course and the commands are exactly the same. sftp in available in Raspberry PI land by default and I use it all the time when working at the command line to transfer files back and forth from my desktops to the headless RPIs.
Thanks a lot. I tried with different user as well. The problem was firewall was enabled by default which was preventing logging in.
After disabling temporarily, things worked.
Thanks for the suggestions. Nice to learn linux with friends like you.
Two 'silly mistakes' are obvious; bolded them both for emphasis.
FTP? In 2022?? Why? Either SSH (which gives you sftp and scp) both work much better, and are much safer, along with already being installed/configured on your system (most likely), or HTTP/HTTPS can be used.
Logging in as root?? 'Naturally'??? That is a HORRIBLE idea, for a host of reasons.
More than likely, root is disabled for security reasons...have you tried another user ID?
Yes. you are absolutely right. I tried with logging as a normal user also. The problem was solved by temporarily disabling firewall which is enabled by default by OS. Now i will also try using sftp and scp by configuring ssh. Nice to learn linux with the help of people like you.
Rsync was mentioned above and works over SSH by default these days. It and SFTP clients like sftp are the way to go for file transfer.
scp should be avoided.
There are plenty of SFTP clients. Not only are FileZilla and Cyberduck available, there are less obvious ones like Thunar, PCManFM, and Nautilus, common file managers.
The problem was solved by temporarily disabling firewall which is enabled by default by OS.
Now that you have identified the firewall as being a blocking point, why do not you reactivate it and allow FTP traffic?
This should not be complicated to achieve.
Finally, surely firewall was enabled by default for good and valid reasons.
Now that you have identified the firewall as being a blocking point, why do not you reactivate it and allow FTP traffic?
This should not be complicated to achieve.
Finally, surely firewall was enabled by default for good and valid reasons.
Yes, the firewall is there for a good reason, but no it will not be uncomplicated to get FTP to pass through it. Check out the sequence diagrams for passive versus active FTP. There are solutions involving FTP, but none are simple. The simple way, which is also the secure way, is to use SFTP as it operates over SSH and needs only port 22 open. Unless one has an interest for 1970s retro computing there are no reasons to experiment with FTP any more.
Last edited by Turbocapitalist; 01-24-2022 at 02:40 AM.
Reason: corrected the link markup
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.