Code

What is FTP: How to Create an FTP Server and Transfer Files via this Protocol / ITech content

What is FTP: How to Create an FTP Server and Transfer Files via this Protocol / ITech content

Course with employment: "Web Developer"

Learn more

Since the emergence of the Internet as a global network, there has been a need to transfer files between computers over long distances. At that time, there were no simple methods, such as uploading files to instant messengers for quick sharing with friends. As a result, in 1971, the FTP protocol was developed, which became the basis for transferring files over the network. FTP, or File Transfer Protocol, provided a reliable and efficient way to exchange data, which was an important step in the development of Internet technologies. This protocol continues to be used to this day, ensuring stable file transfer between different devices.

FTP has become an important tool for fast and reliable file transfer over the Internet. Its popularity is due to its ease of use: to connect to a remote computer, simply enter your login and password. This makes FTP a convenient solution for both personal and business use, allowing you to efficiently exchange data and manage files on remote servers.

In this article, we will take a detailed look at the FTP protocol, its purpose, and how it works. We will also show you how to launch your own FTP server on both Windows and Linux. You will learn about the protocol's key features, its advantages, and possible use cases. Detailed instructions will help you set up an FTP server, ensuring convenient file sharing and remote access.

FTP, or File Transfer Protocol, is a standard network protocol used to transfer files between computers over the internet. It allows users to upload and download files from servers, as well as manage files on remote systems. FTP is an essential tool for web developers and administrators, as it simplifies the data exchange process.

FTP operates in several modes: active and passive. In active mode, the client establishes a connection with the server, while in passive mode, the server provides the client with an address to which it can connect. The choice of mode depends on the network configuration and can affect the data transfer speed.

To use FTP, you need an FTP client. There are many programs, such as FileZilla, WinSCP, and Cyberduck, that offer a user-friendly interface for working with files. These clients allow you to easily drag and drop files and manage them, making the data transfer process more intuitive.

Data transfer security is also an important aspect of working with FTP. It is recommended to use encrypted FTP connections, such as FTPS or SFTP, to protect data from interception and unauthorized access. Ensuring file security is key, especially when transferring confidential information.

In conclusion, FTP remains one of the most popular methods for transferring files on the internet. Understanding its operating principles and capabilities will help you effectively manage data and ensure secure information exchange.

  • What is it?
  • How is it different from HTTP?
  • Pros and cons of the protocol?
  • What are FTPS and SFTP for?
  • How to transfer files?
  • Overview of popular FTP clients?
  • How to create a server on Windows and Linux?
  • What to remember?

What is FTP?

FTP, or File Transfer Protocol, is a standard protocol for transferring data over the Internet. It allows users to upload and transfer a variety of files, including videos, music, programs, and images. Using FTP provides a reliable and efficient way to exchange data between computers and servers. Thanks to this protocol, users can easily manage their files on the network, which makes it an essential tool for web developers and administrators. FTP also supports various access levels, ensuring security and control over transferred data.

File transfer involves two main participants: the client and the server. The client initiates the process by sending a command, while the server processes the request and returns a response, which can be either the requested file or an error message. It's worth noting that the server can be not only a traditional web server but also a regular personal computer. This makes file transfer more flexible and accessible to a variety of users.

To download files, the client must enter a username and password when connecting to the server. However, authorization is not always required. The FTP protocol supports anonymous mode, which allows you to connect to the server without having to enter credentials. This simplifies access to publicly available resources and makes the process of downloading files more convenient.

The check is very simple, but it will do for 1971. Illustration: Olya Ezhak for Skillbox Media

FTP, or File Transfer Protocol, can be compared to the process of sending and receiving packages. Imagine you want to send important documents to a friend who lives in another city. To do this, you pack the files in a box and contact the postal service, which will handle delivery. During this process, you select the recipient's address, which corresponds to the FTP server you want to send the files to.

When you send a package, the postal service transmits it along its route, similar to how FTP sends your data over the internet. Upon receiving the package, your friend opens the box and accesses the documents, which can be compared to the process of downloading files using an FTP client.

Thus, FTP makes it easy and efficient to share files, just as you would use the postal service to send and receive packages. This protocol plays a vital role in data and file management for websites and servers, ensuring reliable and fast information exchange.

If you're a programmer at an IT company, chances are all your code and files are stored on a local server, accessible exclusively to employees. To get started, you need to copy your working files to your computer. This requires connecting to the server, which is a crucial step in the development process. Properly organizing server access and effective file management improves productivity and facilitates team collaboration.

To access the storage via FTP, open the console and establish a connection. Before doing this, you need to obtain a login and password for the connection, as access is impossible without them. After successful authorization, you will see all the files on the server to which you have permission. To download the desired files, enter a few commands and wait for the download to complete. The process is complete!

Connecting to the internal server - receiving working files Illustration: Olya Ezhak for Skillbox Media

Today, the exchange of working files has become significantly faster and more convenient thanks to Git, which uses modern protocols such as SSH and HTTP. However, there are situations when it is necessary to deploy a Git repository on an FTP server. In such cases, the use of FTP remains relevant and indispensable. FTP allows for efficient file management on the server, ensuring stable and simple interaction with remote resources. Despite the emergence of new technologies, the combination of Git and FTP remains an essential tool for developers, allowing them to successfully cope with various tasks during the development process.

How FTP differs from HTTP

There are two main data transfer protocols on the Internet: FTP and HTTP. Both protocols are designed for information exchange, but they have different purposes and areas of application. FTP (File Transfer Protocol) is used primarily for transferring files between devices, making it ideal for downloading and uploading large amounts of data. HTTP (Hypertext Transfer Protocol) is a standard for transmitting hypertext information over the network, allowing users to access web pages and other resources on the internet. Understanding the differences between these protocols will help you choose the most suitable one for specific tasks.

FTP, or File Transfer Protocol, was developed for exchanging data between computers. It operates over two connections: one for data transfer and one for process control. The main purpose of FTP is to ensure efficient monitoring of long-running requests, such as transferring large files or managing server data. Due to its structure, FTP allows users to exchange files conveniently and securely, making it an important tool in web development and server administration.

HTTP is designed for transferring hypertext documents, such as websites and pages. The protocol uses a single connection over which requests and responses are exchanged between the client and the server. This avoids lengthy data exchange sessions: it is enough to transfer the required page, and the interaction can be completed. This approach ensures fast and efficient content loading, which is critical for user experience and search engine optimization.

FTP (File Transfer Protocol) is designed for long-term, deliberate interactions between the server and client. It stores information about who transferred what, when, and what. In contrast, HTTP (Hypertext Transfer Protocol) manages internet requests and does not maintain session state. This allows HTTP to provide higher data transfer speeds, which is critical for web applications and websites. Thus, the choice between FTP and HTTP depends on specific tasks: FTP is preferable for transferring files, while HTTP is better for working on the Internet and processing requests.

Read also:

HTTP, or Hypertext Transfer Protocol, is the main protocol used to transfer data on the Internet. It facilitates the exchange of information between clients, such as web browsers, and servers that host web pages. HTTP downloads text, images, and other resources needed to display websites.

The HTTP protocol plays a key role in web technologies, allowing users to interact with content. Without it, it would be impossible to make requests to load pages or send data to a server. With HTTP, users can access the information they need, making it an indispensable element of the modern internet.

HTTP continues to evolve every year, and more modern versions such as HTTP/2 and HTTP/3 have been created based on it, providing greater speed and security for data transfer. Understanding HTTP and its importance in web development helps not only developers but also users better navigate the digital space.

Pros and Cons of FTP

FTP (File Transfer Protocol) is an essential tool for solving various file transfer tasks. Here are three key tasks for which you might need to use FTP:

The first task may be uploading and downloading files to a web server. This is especially relevant for web developers and administrators who need to update website content, upload new files, or back up data.

The second important task is managing files on the server. With FTP, you can easily rename, delete, or move files and folders, making it easier to organize data and maintain order on the server.

The third task is synchronizing local and remote files. FTP allows you to keep your data up-to-date by ensuring changes are transferred between your computer and the server quickly and efficiently. This is especially useful for teamwork, when several users work with the same set of files.

Using FTP greatly simplifies the file management process and ensures reliable data transfer between devices and servers.

  • Transfer files to other computers. This is convenient when you need, for example, to upload files to a website server or send a video to a friend. Just connect, send, and be satisfied.
  • Backup. To avoid losing files, you can back them up to a remote computer.
  • Remote access to files. FTP can be used as a replacement for Google Drive or Yandex Disk: take a remote computer, upload files there, and retrieve them as needed.

Using FTP to transfer files can have its drawbacks. Firstly, FTP does not provide reliable data protection, since information is transferred in cleartext. This makes your files vulnerable to interception and intruders. Secondly, setting up FTP servers can be complex and require significant effort, especially for users with limited technical knowledge. It's also worth noting that many modern hosting and cloud solutions offer more convenient and secure file transfer methods, such as SFTP or SCP. These protocols provide data encryption and enhance security. Therefore, before choosing FTP for file transfer, it's worth considering alternative methods that may be more efficient and secure. Lack of adequate security. When you connect to a server, data is sent over the network unencrypted, including logins, passwords, and the files themselves. Additionally, FTP lacks brute-force protection, meaning the server password can be cracked using brute-force attacks. Inefficient file transfer. FTP requires a new connection to be established for each transfer. If you want to transfer multiple files simultaneously, this can lead to delays and increased network load, especially when transferring large files. Connection dropped due to an error. If the data transfer is interrupted for any reason, the entire process will have to be started over.

What are FTPS and SFTP for?

To improve security in FTP, methods for encrypting requests were developed, which led to the creation of secure FTPS and SFTP protocols. These two protocols have their own features and differences. FTPS, based on the FTP protocol, adds SSL/TLS support for data encryption, providing protection during file transfer. In turn, SFTP, which is part of the SSH protocol, offers a higher level of security, as it encrypts both commands and data, and also provides user authentication. Understanding the differences between FTPS and SFTP will help you choose the most appropriate protocol for secure file transfer.

FTPS is an extended version of the FTP protocol that provides secure file transfer. The full name of FTPS is File Transfer Protocol Secure, which translates into Russian as "secure data transfer protocol." This protocol uses SSL and TLS certificates to encrypt data, protecting information as it travels over the network. FTPS is an important tool for organizations that require reliable protection of confidential data during file exchange.

The protocol functions similarly to traditional FTP, but when establishing a connection, the client and server exchange certificates. These certificates guarantee the secure and confidential exchange of data between parties. Using certificates increases the level of information security and prevents unauthorized access, making this protocol preferable for transferring sensitive information.

Certificates can be obtained from specialized certification authorities or created independently. Certificates issued by accredited authorities provide a high level of trust and reliability. At the same time, homemade certificates may raise doubts and be perceived by the system as less reliable.

Learn more about how SSL certificates work, their importance, and how to obtain them. In our article, you'll find all the information you need about SSL certificates, their role in ensuring data security, and recommendations for choosing reliable providers. SFTP, or Secure File Transfer Protocol, is an extension of the FTP protocol that uses the SSH protocol for data transfer. This protocol ensures secure file transfer, protecting data from unauthorized access and ensuring its confidentiality. SFTP is widely used to securely transfer information between servers and clients, making it an indispensable tool in the fields of cybersecurity and data management. SFTP, unlike standard FTP, uses only one network port for its operation. The SSH protocol, on which SFTP is based, can divide this port into multiple channels. One of these channels is intended for control, and the other for data transfer. This ensures a more secure and efficient file exchange compared to traditional FTP. SFTP data transfer is carried out using SSH keys for security. One key is located on the client side and is responsible for encrypting traffic, while the other key is located on the server side and is designed to decrypt it. This guarantees the protection of transmitted information and prevents unauthorized access to data.

FTPS is like two entrepreneurs, and SFTP is like two children who invented their own language. Illustration: Olya Ezhak for Skillbox Media

Both protocols are an excellent complement to FTP and can significantly improve the security of data transfer. When choosing between FTPS and SFTP, it is important to consider the specifics of your project. If you already have an SSL certificate, FTPS will be a more convenient option, as it uses the existing security infrastructure. If you do not have a certificate or do not want to purchase one, SFTP is the optimal choice, as it does not require additional certificates and provides reliable data protection.

How to Transfer Files via FTP

The FTP protocol requires interaction between two parties: the client and the server. The client establishes a connection to the server and sends commands to upload or download files. This allows for efficient data exchange between devices on the network. Using FTP ensures secure file transfer, making it a popular choice for web developers and system administrators. Connecting to a server requires knowledge of its IP address, as well as a username and password for authorization. These credentials are configured on the server during its configuration. The IP address can be obtained directly on the server using the ipconfig command in the Windows console. Proper configuration and use of the username and password, as well as knowledge of the IP address, are key to a successful connection to the server. FTP authentication is accomplished by transmitting user credentials, including a username and password. When connecting to an FTP server, the client sends these credentials for verification. If the entered credentials are correct, the server grants access to the file system, allowing uploading, downloading, and managing files. The authorization process begins with establishing a connection between the client and the server. The client sends the USER command to specify the username, and then the PASS command to transmit the password. The server processes this data and, if it matches the records stored in its database, authorization is considered successful.

The FTP protocol can use both standard and secure modes. Secure mode uses data encryption, which provides greater security when transmitting account information. This is especially important for preventing data interception by intruders.

For increased security, we recommend using complex passwords and, if possible, restricting access to the FTP server by IP address. This reduces the risk of unauthorized access and protects data transmitted via the FTP protocol.

FTP supports two authorization methods: using a login and password, and anonymous access. Anonymous mode is available on all FTP servers and allows users to access certain files without having to register. This mode is used to provide general access to resources, making it easier to share files and disseminate information.

You can upload an image to an FTP server and share it with friends, providing access only through anonymous mode. This allows them to see only the file they need without opening access to all other files on the server. This approach ensures greater security and privacy, which is especially important when exchanging personal information.

Authorization in anonymous mode is similar to the standard login and password system. Instead of a login, you must enter the word "anonymous", and the password can be any email address or left blank. This allows users to remain anonymous when logging in, while still providing the necessary level of security and privacy.

Anonymous mode is a legacy feature that remains from the Unix era. At that time, users interacted with systems through login and password authorization, since alternative authentication methods had not yet been developed. This mode allows users to hide their identity, but in today's environment, its importance is declining. Anonymous mode can be useful for maintaining privacy, but it's important to remember that it doesn't guarantee complete security online.

To connect to the server with an IP address, username, and password, you need to use an FTP client. This tool allows you to transfer files between your computer and the server. FTP clients can be either console applications or graphical user interface programs, making them accessible to users of all experience levels. Choosing the right FTP client depends on your preferences and the tasks you plan to accomplish. Using an FTP client significantly simplifies file management on the server and ensures secure data transfer.

To transfer data via an FTP client, you must first connect to the server and complete the authorization process. Connecting to an FTP server in the Windows console is accomplished using specific commands that allow you to establish a connection and enter your access credentials.

To view files stored on the server, use the following command:

The FTP protocol uses two main commands to download or upload files. These commands provide efficient data exchange between the client and the server. Using FTP, users can easily move files, making it an essential tool for web developers and administrators. Basic commands used for file transfer include «RETR» for downloading and «STOR» for uploading. Understanding these commands can help optimize workflows and speed up file management on the server.

  • PUT — to send files from your computer to the server;
  • GET — to download files from the server to your computer.

When you enter a request, the client and server establish a connection to transfer data. The files are then broken into packets—small fragments ranging in size from 1 to 64 KB—and sent via the TCP/IP protocol. For more information on how data transfer works, we recommend reading one of our articles.

The following information is displayed in the console:

If the data transfer is successful, the FTP client will display a notification. If a problem occurs, the data transfer will be interrupted and an error message will be displayed. This message typically consists of an error code and a brief description of the problem. For example, the message might look like this:

To terminate an FTP connection, use the «bye» command. This command effectively closes the current connection to the FTP server, ensuring a secure end to the session. Properly closing the connection helps prevent potential security issues and preserves data integrity.

Overview of Popular FTP Clients

There are many FTP clients, both free and paid. In this review, we will look at several of the most popular and reliable services for transferring files via FTP. These clients will help simplify the process of uploading and downloading data, ensuring security and ease of use.

FileZilla is one of the most popular FTP clients, providing a convenient connection to remote servers. Its intuitive interface and ease of use make it an ideal choice for users of all levels, including beginners. FileZilla supports a variety of features, such as file and folder management and drag-and-drop, simplifying the data transfer process. By choosing FileZilla, you get a reliable tool for working with FTP, SFTP, and FTPS, which will help you effectively manage your files on remote servers.

FileZilla Interface Screenshot: FileZilla

FileZilla is a user-friendly FTP client that features two main windows. The first displays files and folders on your local computer, while the second displays the contents of the remote FTP server. To transfer files between devices, simply drag and drop the desired file from the left window to the right. This simple process makes working with files on different servers easy and convenient. Using FileZilla allows you to effectively manage your data and quickly share files.

FileZilla offers a variety of features, including support for synchronizing data with cloud storage and transferring files via VPN. To ensure secure connections, the software uses SSL and TLS certificates, guaranteeing the protection of transmitted information.

You can download FileZilla from the developer's official website. This is a reliable resource that ensures you receive the latest version of the program. Using the official website guarantees the security and up-to-dateness of the software you download.

This is another open-source FTP client that offers a free solution for working with the FTP protocol. It includes all the necessary features for efficient file transfer and remote server management. With this FTP client, users can easily upload and download files and manage directories, making it an ideal tool for web developers and administrators.

Cyberduck Interface Screenshot: Cyberduck.io

When you launch the Cyberduck client application, you will be prompted to connect to the FTP server. Once successfully connected, you will be able to see the server contents on the screen. To upload a file to the server, simply drag it from a folder on your computer to the Cyberduck window. This process provides a convenient and fast way to share files between your local system and a remote server.

Cyberduck offers advanced features, such as the ability to create bookmarks for frequently used servers, upload files to the cloud, and integration with text editors. Encryption is also available, providing additional security for your data.

You can download Cyberduck from the developer's official website. This file manager supports various protocols, such as FTP, SFTP, and WebDAV, making it an ideal solution for managing files on remote servers. The official website provides the latest version of the program, guaranteeing security and stability.

Another well-known FTP client is CuteFTP. It has many similarities with FileZilla, but the key difference is that CuteFTP is a paid solution. This client is particularly popular in commercial development due to its support for advanced features such as scheduling and file synchronization. CuteFTP is ideal for users who need a reliable tool for managing files on servers, providing a high level of security and ease of use.

CuteFTP Interface Screenshot: CuteFTP

CuteFTP Management Similar to FileZilla, it simplifies the file transfer process. To transfer a file from one computer to another, simply drag it from the left window to the right. For secure data transfer, CuteFTP supports encryption with SSL and TLS certificates, making it a reliable file management tool.

You can download CuteFTP from the developer's official website. This is a reliable source where you can get the latest version of the program. Use only trusted download sources to ensure the security of your device and avoid installing malware.

Popular cloud storage services such as Google Drive, Dropbox, and Microsoft OneDrive can be used as FTP clients. Connecting to an FTP server through these platforms allows for convenient file management and data sharing. For detailed information on setting up an FTP connection through these services, we recommend consulting their official documentation: Google, Dropbox, Microsoft. Using cloud services for FTP significantly simplifies the process of exchanging information and storing data.

How to Create an FTP Server on Windows

To create an FTP server on Windows, you must use the Professional, Educational, or Enterprise versions of the operating system. Home users will have to use third-party applications. If you have the appropriate version of Windows installed, follow a few steps to set up an FTP server.

The first step is to open your device's Control Panel. This is an important step that will allow you to access all system settings and features. Make sure you know how to quickly find the Control Panel, as it is the central control center for your computer's settings. Once opened, you can easily configure settings, manage devices, and perform other key actions.

Screenshot: Skillbox Media

Go to the "Programs" tab. and select "Programs and Features". In this section, find the option «Turn Windows features on or off».

Screenshot: Skillbox Media

In the list, you need to select the FTP server option, and Find the Internet Information Services section and select Website Management Tools. In this section, check the box next to IIS Scripting and Management Tools.

Screenshot: Skillbox Media

Click OK and wait until all settings are applied to the operating system. Windows.

To work with the server, you need to create a folder in which all files will be stored. It is recommended to place it on drive C and name the folder «ftp».

Screenshot: Skillbox Media

Inside it, you can create several files and folders that These are needed to test the FTP server's correct operation. These elements will help ensure that the settings are correct and that files can be accessed. Creating test files and folders is an important step in setting up an FTP server, as it allows you to ensure that data transfer occurs without errors and that the server is functioning properly.

Screenshot: Skillbox Media

Now we need to publish our server. To do this, open Internet Information Services (IIS) Manager. In this interface, you can manage web servers, configure sites, and monitor their availability. Make sure you have the necessary access rights to perform these actions. After opening the manager, find the desired site and configure settings such as hosting, protocols, and ports. Once the setup is complete, you can launch the server to make it available to users.

Screenshot: Skillbox Media

In the window that opens, on the left, find the "Sites" section. and right-click on this item. In the context menu, select "Add FTP Site." It is important not to confuse this option with adding a website.

Screenshot: Skillbox Media

Now you need to specify our server details. In the "FTP Site Name" field, enter any name you like. In the "Physical Path" tab, specify the path to your ftp folder. Then click "Next."

Screenshot: Skillbox Media

After that, a window with additional parameters will open. In the Binding section, leave everything unchanged, and in the SSL settings, select the Without SSL option. In the future, you can try setting up a server using encryption, but for now our task is to figure out how to launch a simple server.

Screenshot: Skillbox Media

In the last settings window, you need to determine which users are allowed to log in to the server and set the appropriate permissions for them. It's recommended to select options for anonymous and regular users, and in the advanced settings, specify that they will be able to both read and write data. This will provide the necessary level of access and allow you to effectively manage information on the server.

Screenshot: Skillbox Media

Our server has been successfully created and published. You can find it in the list of all available servers.

Screenshot: Skillbox Media

To access the FTP server, you must first know the IP address of your computer. To do this, open the console by entering the command "cmd" in the search bar. Then enter the command "ipconfig." This command will display information about your network connections, including your local IP address, which you'll need to connect to the FTP server. Please ensure you are using the correct network settings and have access to the necessary credentials to connect.

Screenshot: Skillbox Media

Copy the address from the IPv4 address field. Then open File Explorer or any FTP client and enter ftp://[your IP address] in the address bar. After that, you will be able to see all the files on the server.

Screenshot: Skillbox Media

Can I open the server in Google Chrome? Yes, it is possible. Modern browsers, including Google Chrome, support working with local servers. You can use tools like Node.js or XAMPP to create a local server on your computer and access it through a browser. To do this, simply enter the server address, such as http://localhost:3000, in the Chrome address bar. This allows developers to test their web applications and pages in real time. Using a server in Google Chrome opens up many possibilities for web development and debugging.

In the past, FTP links could be opened directly through a web browser. However, in recent years, browser developers have begun to gradually disable support for this protocol, considering it obsolete and insecure. This has led to a decrease in FTP availability for users, necessitating the search for alternative file transfer solutions.

To restore FTP support in the Chrome browser, you need to downgrade to version 91. In this version, you can activate FTP support by checking the Enable support for FTP URLs checkbox, which is located at chrome://flags. This will allow users to use the FTP protocol again to access file shares through a browser.

How to create an FTP server on Linux

Linux distributions do not have an FTP server installed by default, so you need to install it manually. For Ubuntu and Debian users, you can use the following command:

For CentOS and Fedora operating systems, the command will be slightly different. When installing or configuring software on these Linux distributions, it is important to take into account their specific features. For example, CentOS and Fedora may use different package managers and repositories. Make sure you use the appropriate commands for your version of the system to avoid errors and ensure that applications work correctly.

After that, we will need to enter the password for the account, after which the installation process will begin.

Once the FTP server starts, you will be able to connect to it using a browser. To do this, you first need to find out the IP address of your computer. This can be done using the ifconfig command, which is included in the Net-tools package. Please note that this package may need to be installed first.

Screenshot: Skillbox Media

To set up an FTP server, you need to determine the IP address of your network. This example uses the address 192.168.0.47, but yours may be different. It's important to note that you can also use the localhost alias to connect to an FTP server running on your local machine. This simplifies the process because you don't need to remember or type the numeric address.

To start vsftpd, use the following command:

Let's test our FTP server's functionality using a Linux-style command line. To do this, connect to the server.

Now you need to enter a username and password that match your operating system credentials. After logging in, it's recommended to use the ls command to determine which directory you're in and what files and folders are available on your FTP server. This will give you an idea of ​​the directory structure and available resources.

Screenshot: Skillbox Media

Now we will set up anonymous mode for our FTP server so that the connection occurs without the need to enter login and password. First, let's stop the vsftpd service. To exit FTP mode on the command line, simply type quit after >ftp.

Once the service is stopped, open the vsftpd configuration file, which is usually located at /etc/vsftpd.conf. Find and change the following parameters: set anonymous_enable=YES to allow anonymous access. It is also recommended to set anonymous_upload_enable=NO to prevent anonymous users from uploading files.

After making the changes, save the file and restart the vsftpd service to apply the new settings. Your server is now ready for anonymous connections, allowing users to easily access files without having to create an account.

The server is stopped. The next step is to make changes to the /etc/vsftpd.conf file. You can use the Nano text editor to edit this file. Run the command to open the file in the editor, make the necessary changes, and save the file. After that, restart the server to apply the new settings.

Open the file and use the arrow keys on your keyboard to scroll to the line with the anonymous_enable=NO parameter.

Screenshot: Skillbox Media

The Nano editor is controlled using keyboard shortcuts. To change the word NO to YES, you need to use the appropriate keyboard shortcut. After that, press Ctrl + O to save the file and confirm the changes by pressing Enter. Thus, the changes have been successfully made.

To exit the current mode, use the keyboard shortcut Ctrl + X. Now you can use anonymous mode. To restart the server, enter the following command:

Let's go to the FTP server.

Authorization is required again. But where is the anonymity? For this, a special user named anonymous and a blank password are provided. Log in and enjoy working on the new server.

What to remember

The FTP (File Transfer Protocol) protocol is a standard network protocol used for transferring files between computers on a network. FTP's core functions include uploading and downloading files and managing directories on remote servers. It enables data exchange over various connection types, including active and passive modes.

FTP operates on a client-server model, where the client sends requests to the server, which processes them and returns the relevant information. Data transfer security can be ensured using extensions such as FTPS and SFTP, which add encryption to the transfer process. It is important to understand that, despite its popularity, FTP can have vulnerabilities, so it is recommended to use secure protocol variants.

Web developers and system administrators often use FTP to upload content to websites and to back up data. Understanding how FTP works and its features will help you effectively manage files on your server and improve the performance of web projects.

  • FTP is a network data transfer protocol. It was created in 1971 to quickly and easily transfer files from one computer to another and manage remote servers.
  • The protocol requires two elements: a client and a server. The client connects to the server using a username and password and then sends commands to download or upload files.
  • FTP transfers data in an insecure manner. If someone connects to your network, they can download files along with you. Therefore, it is recommended to use secure protocol extensions - FTPS or SFTP.

Check out the following resources:

  • What is HTTP and why is it needed?
  • Test: What do you know about HTTP status codes?
  • What is the OSI model and why is it needed: dissecting the layered cake of the Internet