How to establish an ftp connection. How to create FTP connections (Total Commander and FileZilla file managers)? Passive mode in the FTP protocol

The easiest way to upload all files to the hosting is using the ftp protocol. Today we will talk about how to set up an FTP connection.

What is ftp

The setup process itself is not complicated. Therefore, first a few words about what FTP is. The literal translation of this abbreviation into Russian means “file transfer protocol”. With its help, a connection to ftp servers and subsequent downloading occurs necessary files. FTP server is a simple computer with special software. You don’t need to think about how to set up an FTP server, since this is done by the hoster. You will only need to set up a connection with it.
Almost always every folder and rarely separate file, have access rights - execute, read and write. It’s already clear from the name what each of these types of access provides. If they are all allowed at the same time, then you can do everything with files (folders) - view, overwrite and execute. Your .should give you the FTP parameters.

For FTP connection use file managers. The most popular of them are Total Commander and FileZilla. Let's talk about how to set up FTP using them now.

FileZilla

This free software, which can be downloaded freely on the Internet. It is easy to use and its interface has nothing superfluous. To set up a new FTP connection, you should select the New Host tab and name it. The name for the connection does not matter, the main thing is that you yourself understand what it is for. Perhaps you will have more than one such entry in the future and it is important for you not to get confused in them. After this, a window will appear in which you should enter the FTP connection data that your hoster provided to you. This must be the FTP server address, login and password. When all the data has been entered, click "OK".

Total Commander

This is also a free program, and it is perhaps the most popular file manager in the world. The process of setting up an FTP connection is not much different from what we did with FileZilla.

We also select the “Connect via FTP” tab. Then in the window that appears, select “Add”. Again, enter the data received from the hoster and click on “OK”. The new connection will then appear in the list of all connections. To connect, you just need to select it and click on the “Connect” button.

That's all. Thus, today we set up an ftp connection.

    Abbreviation FTP comes from English F ile T transfer P rotocol (file transfer protocol) is an application layer protocol for exchanging files over transport protocol TCP/IP between two computers, FTP client and FTP server. This is one of the oldest, and yet still actively used protocol.

The FTP protocol is designed to solve the following problems:

  • access files and directories on remote hosts
  • ensuring client independence from the file system type of the remote computer
  • reliable data transmission
  • use of remote system resources.
  • The FTP protocol supports two connection channels at once - one for transfer teams and the results of their implementation, the other is for sharing data. At standard settings The FTP server uses TCP port 21 to organize a channel for sending and receiving commands and TCP port 20 to organize a channel for receiving/transmitting data.

    The FTP server waits for connections from FTP clients on TCP port 21 and, after establishing a connection, accepts and processes FTP commands, representing ordinary text strings. The commands define connection parameters, the type of data transferred, and actions in relation to files and directories. After agreeing on the transmission parameters, one of the exchange participants enters passive mode, waiting for incoming connections for the data exchange channel, and the second establishes a connection to this port and begins transmission. Once the transfer is complete, the data connection is closed, but the control connection remains open, allowing you to continue the FTP session and create a new data transfer session.

    The FTP protocol can be used not only to transfer data between a client and a server, but also between two servers. IN in this case, the FTP client establishes a control connection with both FTP servers, switches one of them to passive mode, and the second to active, creating a data transfer channel between them.

    An FTP client is a program that connects to an FTP server and performs the necessary operations to view the contents of the server's directories and receive, transfer, and delete files or folders. A regular browser can be used as such a program, components operating system or specially designed software products, such as the popular download manager Download Master or multifunctional free FileZilla FTP Client .

    The FTP protocol was developed back in the days when the client and server interacted directly, without any intermediate transformations of TCP packets, and in standard mode it assumes the ability to create a TCP connection not only at the initiative of the client, but also at the initiative of the server from TCP port 20 on TCP - client port, the number of which is transmitted during the creation of a data session.

    Realities today are such that such a TCP connection from server to client is in the vast majority of cases impossible, or very difficult to implement due to the fact that in most cases, broadcast technology is used to connect to the Internet network addresses NAT(Network Address Translation) when the client does not have a network interface available to create a direct TCP connections from the Internet. Typical scheme standard connection The Internet looks like this:

    Internet connection is made through a special device - Router(router with NAT function) having at least two network ports- one connected to the provider’s network, having a network interface with a routable IP address (the so-called “white IP”), for example 212.248.22.144, and a port with a network interface for connecting devices local network with a private, non-routable IP address, such as 192.168.1.1 (“gray IP”). When creating connections from local network network devices to external network nodes, IP packets are sent to the router, which performs address and port translation so that the sender's address becomes his white IP address . The translation results are saved and when a response packet is received, a reverse address translation is performed. Thus, the router ensures the forwarding of TCP/IP packets from any local network devices to external networks and the return forwarding of received response packets. But in cases where a packet that is not related to TCP response packets is received at the input of a network interface connected to the provider’s network, the following reaction options are possible for the router software:

    The packet is ignored because there is no network service to process it.

    The package is received and processed network service the router itself, if such a service exists and is waiting for an incoming connection (“listening”) on the port whose number is indicated in the received packet.

    The packet is forwarded to a server on the local network waiting for this type incoming connections in accordance with the rules of port redirection (port mapping) specified by the router settings.

    Therefore, at present, the main mode of operation using the FTP protocol has become the so-called “passive mode”, in which TCP connections are made only from the client to the TCP port of the server. The active mode is used in cases where it is possible to connect TCP from the server to client ports, for example, when they are on the same local network. Choice FTP mode- connections are made using special commands:

    PASV- the client sends a command to perform data exchange in passive mode. The server will return the address and port to which you need to connect to receive or transmit data. Example of a fragment of an FTP session with passive mode set:

    PASSV- command to switch to passive mode transmitted by the FTP client to the FTP server

    227 Entering Passive Mode (212,248,22,144,195,89)- FTP server response, where 227 is the response code, text message about switching to passive mode and in parentheses the IP address and port number that will be used to create a data transmission channel. The address and port number are displayed as decimal numbers separated by a comma. The first 4 numbers are the IP address (212.248.22.144), the remaining 2 numbers specify the port number, which is calculated by the formula - the first number is multiplied by 256 and the second number is added to the result, in in this example port number 195*256 +89 = 50017

    PORT Client IP address port number- the client sends a command to establish a session in active mode. The IP address and port number are specified in the same format as in the previous example, for example PORT 212.248.22.144,195,89 To organize data transfer, the server itself connects to the client on the specified port.

    Installing and configuring FileZilla FTP Server.

    You can download the FileZilla Server installation package for your version of the operating system at

    Server installation in progress in a standard way, with the exception of the item with selecting server control panel settings:

    This is the main server management tool through which all necessary settings. By default, the control panel operates on a loopback interface without password access. If necessary, for example, if required remote control FTP server, these settings can be changed.

    Once the installation is complete, an invitation window will open to connect to the server:

    After entering the IP address, port number and password (if you specified them during the installation process), the FileZilla Server control panel opens:

    At the top of the window there is the main menu and control panel buttons. Below are two areas - information messages server and statistical information. Overall, FileZilla Servver's FTP control panel is quite simple and easy to use. Main menu items:

    File- operating modes of the FTP server control panel. Contains sub-items

    - Connect to Server- connect to the server
    - Disconnect- disconnect from the server
    - Quit- shutdown of the control panel.

    Server- FTP server management. Contains subparagraphs:

    - Active- start/stop FTP server. At checked box The FTP server is running, but if disabled, it is stopped.
    - Lock- prohibit/allow connections to the server. When the checkbox is checked, new connections to the server are prohibited.

    Edit- editing settings. Sub-items:

    - Settings- basic server settings.
    - Users- FTP server user settings
    - Groups- user group settings.

    As an example, let's configure the server for the following conditions:

  • the server is behind NAT, has a private IP address, but must be accessible from the Internet, supports passive mode and uses non-standard TCP ports. Using non-standard ports reduces the likelihood hacker attacks, and in addition, some providers use traffic filtering and block standard ports 20 and 21.
  • users have the ability to download from the server, upload to the server, delete and rename files and folders.
  • If you use a dynamic IP address, you must ensure that the server is accessible by DNS name.
  • the server will operate on a workstation in a Windows 7 / Windows 8 OS environment.
  • In other words, you need to create an FTP server accessible from the Internet for exchanging files between users, of course for free. It is quite clear that in addition to creating the necessary configuration of the FTP server itself, you will need to change some router settings, Windows firewall settings, and solve the problem of a dynamic IP address so that the server is accessible by name, regardless of the change in IP address.

    Solving the problem of dynamic IP address.

        This problem does not require a solution in cases where, when connecting to the Internet, a static IP address is used, or a dynamic one, but in accordance with the provider’s settings, it is almost always the same. Otherwise, you can use a technology called Dynamic DNS (DDNS) . This technology, allows you to update IP address information on the DNS server in near real time, and access the router (and services behind it) by its registered name, without paying attention to dynamic IP changes.

    To implement this technology for free, you will need to register with some dynamic DNS service and install client software to update the DNS record if the corresponding IP address changes. Dynamic DNS support is usually provided by network equipment manufacturers (D-Link, Zyxel, etc.), some hosting and specialized companies, such as the well-known DynDNS. However, after in the second half of 2014, all services that were provided to registered users free of charge for non-commercial use became paid, the most popular solution, perhaps, was the use of dynamic DNS based on the service No-IP.org, which provides free support services for 2 nodes with dynamic IP. For free use The service will require registration and periodic (approximately once a month) visit to the site to update information about the nodes used with dynamic IP. If you skip updating the node data, the service is suspended, and accordingly, it will become impossible to connect to the node by name. At paid use no service update required.

        Almost all modern routers (modems) have built-in support for a dynamic DNS client. Its setup is usually very simple - you fill in the fields with the user name and password, as well as the host name received when registering on DDNS service. Example for Zyxel P660RU2

        Using the DDNS client built into the router/modem is preferable to the DNS data update utility running in the OS environment, since it allows you to implement additional features, such as managing the router via the Internet when the computer is turned off and remote activation power supply to computers behind NAT technology Wake On Lan.

    In those cases where it is not possible to use the built-in DDNS client, you will have to make do with application software - a client program for supporting dynamic DNS. Such a program periodically connects to a server that maintains a registered domain name associated with the router through which the Internet connection is made, and calls the IP update procedure when it changes. The server settings are made in such a way that the comparison of the DNS name and the IP address of the Internet connection is completed in a very short time, and the dynamic nature of the address has virtually no effect on the performance of services associated with the DNS name.

    The procedure is as follows:

  • We go to the website No-IP.org. To work with an existing or new account, use the button "Sign In"(top right side of the page).

  • Create, if it has not yet been created, your account - click "Create Account". The registration form changes periodically, but it is mandatory to enter the desired username, password and your E-mail. An email with a link to confirm registration is sent to the e-mail specified during registration. When registering, select free access - press the button Free Sign Up
  • after filling out all the required form fields. After successful registration log into the site and add an entry for your node - click the button

    "Add Hosts" In fact, you only need to enter the selected host name, in this case - myhost8.ddns.net . There is no need to change any other parameters. Then you need to download and install a special - software(DUC), the link to which is located on the main page of the site. After the installation of DUC is completed, it will launch and an authorization window will open, where you need to enter the username or E-mail and password received when registering on the no-ip.org website. Then press the button Edit Hosta and check the box next to the previously created host name (myhost8.ddns.net). Now, the selected host name will always correspond to the “white IP address” of your Internet connection. If you are having trouble updating your IP address, check to see if your DUC client's network activity is being blocked by a firewall.

    Setting up an FTP server

        Using non-standard port numbers for an FTP server is not at all necessary if the provider does not use traffic filtering, or you do not care about scanning ports for vulnerabilities and trying to guess passwords. In this article, using FTP-servers with non-standard TCP ports, presented as one of possible options.

    FileZilla Settings Server are executed through the menu "Edit" - "Settings"

    Window General Settings intended for general FTP server settings.

    In the "Listen on this port" field you can specify the port number for incoming TCP connections. By default, this field is set to 21 , and to use a non-standard number you need to specify the selected value, for example - 12321 . Using a non-standard TCP port has some inconvenience, since it requires specifying its value when creating a session:

    If the server is planned to be used both with access from the Internet and on the local network, it makes sense to leave standard value 21, not Standart room port to use for connections from the Internet, configuring the redirection of packets arriving on port 12321 of the router to port 21 of the FTP server on the local network. With this setup, there is no need to specify a port number for FTP sessions within the local network.

    Other parameters are for tuning performance and session timeouts. They can be left unchanged. The remaining sections of general settings can also be left as default:

    Welcome Message- text that is sent to the client upon connection.

    IP Binding- on which network interface client connections will be expected. By default - on any, but you can specify a specific one, for example - 192.168.1.3.

    IP Filter- setting up filtering rules for client IP addresses. By default, connections are allowed for any IP.

    Chapter Passive mode settings serves to configure passive FTP mode and will require changing almost all default parameters.

    The port numbers that will be used to transmit data in passive mode must be set manually, since the router will need to be configured to redirect it to the network interface that the server is listening to. Therefore, you need to check the box to enable the "Use custom port range" mode and set the range - for example, from 50000 before 50020 . The number of ports the server listens to determines the limit on the number of simultaneous data transfer sessions.

    Subsection IPv4 specific defines the IP address that will be sent by the server in response to the PASV command. In this case, it should not be the server’s own IP 192.168.1.3, but the “white IP” of our Internet connection. Therefore, you need to set the “Use the following IP” mode and instead of the IP address, enter the name received when registering with the dynamic DNS service - In fact, you only need to enter the selected host name, in this case -. As an alternative, you can use the mode for determining the external IP address using the FileZilla project by turning on. "Retrieve external IP Address from:". This option can be selected in cases where it is not possible to use the dynamic DNS tool. If you intend to use an FTP server on your local network, you need to set the mode to "Don"t use external IP for local connections" (do not use an external IP address for connections within the local network)

    The rest of the server settings can be left unchanged or, if necessary, performed later: Security settings- Security Settings. By default, connections that can be used to implement DDoS attacks are prohibited

    Miscellaneous- settings for buffer sizes and other log parameters and some FTP commands.

    Admin Interface settings- server control panel settings. You can specify the network interface, listening port number, IP addresses from which connections to the control panel are allowed, and a password.

    Logging- server event log settings. By default, writing to the file is not performed.

    Speed ​​Limit- data transfer rate limit settings. By default - no restrictions.

    Filetransfer compression- settings for file compression during transfer. The default is no compression.

    SSL/TLS settings enabling encryption mode for transmitted data. The default is no encryption.

    Autoban- enable automatic blocking of users who guess the password to connect. Default, Automatic blocking off.

    Setting up port forwarding and firewall

    In order for the FTP server to be accessible from the Internet, it is necessary to configure the router in such a way that incoming connections coming to certain TCP ports of the external interface are redirected to the TCP ports listened to by the FTP server internal network. For various models Router settings may differ in terminology, but their meaning is the same - a TCP packet with a specific port number received on the external (WAN) interface is sent to the local network to the desired IP address and port. Example of settings for the D-Link DIR-320NRU router for port forwarding used for passive FTP mode:

    Packets received on an interface with a "white IP" and having port numbers in the range 50000-50020 will be redirected to the IP address specified in the "Internal IP" field (in our case - 192.168.1.3). Similarly, a redirection is created for port 50021 if you change the number standard port, or to port 21 of the FTP server if you left it unchanged.

    After applying these settings, the FTP server will be accessible via URL ftp://myhost8.ddns.net:50021 or, for a connection within a local network:

    ftp://192.168.1.3- if you did not change the default port number (21) in the FTP server settings.

    ftp://192.168.1.3:50021- if a non-standard port number is used.

    You can use a computer name instead of an IP address if it can be resolved to an IP address

    ftp://comp1

    ftp://comp1.mydomain.ru

    Diagnosis of problems

    If the connection to the FTP server does not occur, then there may be problems with the firewall blocking the connections necessary for the operation of the created FTP server. If you use the built-in Windows firewall, you must add a rule that allows network activity for the "FileZilla FTP server" service. If used third party firewall or an antivirus with traffic filtering, then you need to create a corresponding rule using the available settings tools to allow network connections. Options are possible when settings are made to allow any network activity specific program, or to allow selected addresses and ports to apply to all programs.

    The best place to start diagnostics is on the FTP server itself. As a diagnostic tool, you can use a standard telnet client(utility telnet.exe) . All firewalls do not block connections on the loopback interface, and to check that the server settings are correct, you can connect to it by entering the command:

    telnet localhost 21- if a standard port number is used.

    telnet localhost 50021- if the standard port number has been changed.

    When this command is executed, a connection to the FTP server is made via the loopback interface and a server invitation (Welcome Message) should be displayed in the telnet window. If this does not happen, the server may be stopped, there is a port conflict, or port 21 (50021) is not listening. For diagnostics you can use the command netstat:

    netstat –nab

    The command line options mean:

    n- use numeric port numbers and IP addresses

    a- display all connections and listening ports

    b- display the names of programs involved in creating connections.

    Example of displayed command results:

    Active connections

    Name     Local address     External address     Status
    TCP         0.0.0.0:21                 0.0.0.0:0                 LISTENING
    TCP         0.0.0.0:135               0.0.0.0:0                 LISTENING
    RpcSs

    In a collumn Local address there is a meaning 0.0.0.0:21 , which indicates that the program named FileZilla Server.exe listening (state LISTENING) TCP port number 21 on all network interfaces. If a specific interface and a different port number were specified in the FTP server settings, then this value will contain IP:port, For example - 192.168.1.3:50021

    To display the results in page mode, you can use the command:

    netstat -nab | more

    Or use search results by port number: netstat -nab | find ":21"

    If the server is unavailable on a non-loopback interface, but accessible on a loopback interface, you need to understand the firewall settings.

    Setting up users and groups.

    Setting up users and groups is done through the menu "Edit" - "Users" ("Groups"). It is not necessary to create groups, but sometimes it is convenient for those cases when there is a large number of users and their rights in relation to the FTP server are different. The settings for both groups and users are almost identical:

    This example shows the result of adding an FTP server user named user1 having full rights to write, read, delete and merge files, as well as to view the contents, delete and create subdirectories in a directory C:\ftp\public

    On the page General user properties are added, deleted, and changed.
    On the page Shared Folders settings are made that determine the list of file system directories that will be used by the FTP server to provide access to them via the FTP protocol. Each user or group of users can be given their own directory with certain rights in relation to its contents.
    On the page Speed ​​limits You can set restrictions on data exchange speed.
    On the page IP Filter You can set filtering rules for the user's IP address, indicating the addresses from which connection to the server is prohibited or allowed.

    List of basic FTP commands

    ABOR - Abort file transfer
    CDUP - Change directory to a higher one.
    CWD - Change current directory.
    DELE - Delete a file (DELE filename).
    HELP - Displays a list of commands accepted by the server.
    LIST - Returns a list of files in a directory. The list is transmitted via the data connection (port 20).
    MDTM - Returns the file modification time.
    MKD - Create a directory.
    NLST - Returns a list of files in a directory in more short format than LIST. The list is transmitted via the data connection (port 20).
    NOOP - Empty operation
    PASV - Enter passive mode. The server will return the address and port to which you need to connect to collect the data. The transfer will begin when the RETR, LIST, etc. commands are entered.
    PORT - Login active mode. For example PORT 12,34,45,56,78,89. Unlike the passive mode, the server itself connects to the client to transfer data.
    PWD - Returns the current server directory.
    QUIT - Disconnect
    REIN - Reinitialize connection
    RETR - Download file. RETR must be preceded by a PASV or PORT command.
    RMD - Delete directory
    RNFR and RNTO - Rename the file. RNFR - what to rename, RNTO - what to rename.
    SIZE - Returns the file size
    STOR - Upload a file to the server. STOR must be preceded by a PASV or PORT command.
    SYST - Returns the system type (UNIX, WIN,)
    TYPE - Set the file transfer type(A- text ASCII, I - binary)
    USER - Username to log into the server

    Example FTP session

    FTP client connects to server with username user1, an empty password and downloads a file named cpu-v. Messages from the FTP server are highlighted in red, messages from the FTP client are highlighted in blue. The exchange of directives and parameters may differ slightly for different versions FTP client and FTP server software.

    After connecting, the server transmits information about itself to the client:
    220-FileZilla Server version 0.9.45 beta
    220-written by Tim Kosse ( [email protected])
    220 Please visit http://sourceforge.net/projects/filezilla/
    The client passes the username:
    USER user1
    The server asks for a password:
    331 Password required for user1
    The client passes an empty password:
    PASS
    The server verifies the user account and reports the start of the session:
    230 Logged on
    The client requests the type of operating system on the server:
    SYST
    The server reports that the type Unix, emulated by Filezilla server:
    215 UNIX emulated by FileZilla
    The client requests a list of parameters supported by the server:
    FEAT
    The server responds with a list of supported parameters:
    211-Features:
    MDTM
    REST STREAM
    SIZE
    MLST type*;size*;modify*;
    MLSD
    UTF8
    CLNT
    MFMT
    211 End

    The client requests the current directory of the server:
    P.W.D.
    The server reports that the current directory is the root directory ("/"):
    257 "/" is current directory.
    The client reports that it will transfer binary data:
    TYPE I

    The server confirms the type of data being transferred:
    200 Type set to I
    The client reports that it will use passive FTP mode:
    PASV
    The server reports the transition to passive mode and transmits the IP and port for passive FTP mode.
    227 Entering Passive Mode (212,248,22,114,195,97)
    The client requests to receive a file named cpu-v from current directory servers
    RETR cpu-v
    The server reports the start of data transfer:
    150 Opening data channel for file download from server of "/cpu-v"
    Upon completion, the server reports a successful transfer:
    226 Successfully transferred "/cpu-v"

    In conclusion, I would like to add that the Filezilla project includes not only the development and support of high-quality free FTP-server, but also a popular free FTP client

    Article from brief description free FTP client and for Linux, Mac OS and Windows. This FTP client supports many application data transfer protocols - FTP, FTP over SSL/TLS (FTPS), SSH File Transfer Protocol (SFTP), HTTP, SOCKS and FTP-Proxy. In other words, Filezilla FTP Client is a universal software for receiving and transmitting files across all modern application protocols between nodes on different platforms.

    Installing an FTP server.

    The FTP server is included with Internet Information Services. To install it, open Control Panel -> Programs -> Enable or disable Windows components. Expand the IIS Services section and check the boxes next to the following components: FTP Service and IIS Management Console.

    Setting up an FTP server.

    Open Control Panel -> System and Security -> Administration -> Computer Management (you can quickly: Start menu -> right click on Computer -> select Management from the menu). In the window that opens, expand the Services and Applications group and open IIS Service Manager. In the Connections window, select the Sites folder, then in the right Actions window click on the Add FTP site link.


    In the FTP site creation wizard, specify its name and location (by default c:\inetpub\ftproot).


    Next, specify the binding and SSL parameters. I leave the binding section unchanged. I disable the “Start ftp site automatically” option (I only need ftp from time to time). In the SSL section, I select the “Without SSL” option.


    In the next window, leave everything unchanged and click Finish.


    The site has been created. Now you can go to additional options for fine tuning(for example limit maximum amount simultaneous connections). Select the newly created site, on the right in the Actions panel click on Additional options.


    The next step is setting up the Windows Firewall. Open Control Panel -> System and Security -> Windows Firewall -> Advanced Settings. In the “Rules for incoming connections” section, find and activate “FTP server ( incoming traffic)" and "FTP Server Passive (FTP Passive Traffic-In)". The last rule allows the ftp client to connect in passive mode.



    In the “Rules for outgoing connection” section, find and activate “FTP Server (FTP Traffic-Out)”.


    If an additional firewall is installed on the system (Comodo, Outpost, etc.), then it also needs to open port 21 (TCP) for incoming connections and port 20 (TCP) for outgoing ones.

    If you connect to the Internet using a router, and you want to make your server accessible to Internet users, then you need to configure port forwarding on the router. On my Dlink DI-804HV this is done in the Virtual Server section.


    192.168.10.4 — IP address of the ftp server on the local network.

    Setting up user rights.

    If you leave everything as it is, then any user can connect to the FTP server (anonymous access is enabled) with read-only rights (you can download, but you cannot write or change files). Let's assume that we need to make access for trusted users who would have the rights to write and change files.

    Open Control Panel -> System and Security -> Administrative Tools -> Computer Management (Start -> right click on Computer -> select Management from the menu). Next, expand the group Local users and groups ( this setting available only in Business and Ultimate editions). Right click on the Groups folder and select Create Group from the menu.


    Enter the name of the group - FTP Users, a description (you don’t have to enter it) and click the Create button.


    Now you need to create a user. Right-click on the Users folder and select New User from the menu.


    Enter the user name (for example ftp_user_1), password (at least 6 characters), check the boxes next to the options “Prohibit the user from changing the password” and “Password does not expire.”


    The user has been created. Now you need to assign it the previously created group Ftp Users. To do this, open the user properties and go to the “Group Membership” tab. By default, a new user is assigned the Users group; delete it. Click the Add button -> Advanced -> Search. A list of user groups will open. Select the FTP Users group and click Ok. As a result we get:


    Click Ok and move on to the next step.

    At the stage of creating an ftp site, we needed to select a working directory (c:\inetpub\ftproot). Now you need to configure access rights to this directory for the FTP Users group. Open c:\inetpub in Explorer, open the properties of the ftproot folder, go to the Security tab and click the Edit button. In the window that opens, click the Add button and select the “FTP Users” group (as when creating a user). Set the permission level to “Full Control” and click OK.


    Final stage. Open IIS Services Manager again and select our ftp server (Test FTP). In the FTP site control panel, select “FTP Authorization Rules”. Add an allow rule. In the window that opens, select the “Specified roles or user groups” option. At the bottom, in the text field, we manually write the name of our group (FTP Users), then check the boxes in the Permissions section opposite Read and Write and click OK.


    This completes the setup.

    At the beginning, we did not select the option to automatically start the server, so we do not forget to start it manually (right click on the site name -> Manage FTP site -> Start).

    How to connect?

    Option using Windows Explorer.
    Open Computer (Vista, Win 7) or My Computer (XP).
    For anonymous access, simply enter in address bar server address (ftp://192.168.10.4).
    To log in with a username and password, enter an address like: ftp://[username]:[password]@[ftp server address]. For example ftp://ftp_user_1: [email protected]- to connect from a local network. To connect from the Internet local address replace it with an external or domain name.

    Yesterday I received a letter to my inbox from a complete stranger, as I understood, a novice webmaster, in which he asked a question about how to access the root of a site via an FTP connection. The question is quite elementary, but this is only for people who have been dealing with this for a long time and often. But for beginners, this is really a problem that I also encountered at initial stages of its activities.

    So, what is the root of the site? To put it simply, these are all the folders and files of your website or blog located on the hosting server. This is actually your site in the form of codes.

    You can access the root of the site via an FTP connection. There are a huge number of file manager programs with which you can do this. I, perhaps out of habit, or maybe from the point of view of rationalism, do this, as a rule, in two ways, which I will discuss in more detail in this article.

    The first way to establish an FTP connection is through Total Commander. Total Commander, by definition omniscient Wikipedia, is a closed source file manager running on the Microsoft Windows . You can download it on the Internet from a variety of resources, links to which, given their multitude, make no sense. Installation Total Commander It is also quite simple and, I think, will not cause any difficulties for anyone.

    How can you use Total Commander establish an FTP connection? Let's take a closer look. IN top menu of this manager, you need to select the option “ Net" (in newer versions this is the option " FTP connection" or simply " FTP»).

    When you left-click on this option, a drop-down menu opens down, where you, among other things, look for the option “ Connect to FTP server..." Also, when you click on it with the left mouse button, approximately the following table will open.

    Since you do not have any connections yet, you should click on the " Add …", after which you will receive the following form.

    Fill this form should be as follows. In the line " Connection name:» You are desirable with Latin letters Enter an arbitrary name for the future connection. For example, I call the connection the first part of the site domain, so as not to get confused later when there are many connections (as in the example above). In the line " Server (port):» indicates either the IP address of the hosting server or the name of the server. This information can be obtained from your hosting website. It may be located in the sections " FTP connection», « Connection characteristics" or " Login to the server"(there can be quite a lot of options for section names, it all depends on the imagination of your hosting administrators). In line " Account:» indicates the designation of your hosting account, the form of which can also be quite arbitrary and depends on the imagination of the hosters. In line " Password:» indicate the password chosen by you or proposed by the hosting to enter the FTP connection. Leave all other lines as default and click “ Ok" After which your connection is created.

    In order to go to the server at the root of the site, click the button in the right menu of the form “ Connect" Next, there may be several options for the content of folders on the server. When opening folders, look for the main folder of your site, which in the vast majority of cases is called public_html. Having opened it, you find yourself in the root of your site (its approximate appearance for a WordPress site in the figure below) and you can perform various manipulations with their content.

    The second way to establish an FTP connection through a file manager FileZilla, which the same Wikipedia denotes as “ free FTP client" Why did I choose among huge amount file managers FileZilla? Yes, precisely because it is free. Download this manager you can visit his main website filezilla.ru . Installation shouldn't be too difficult for you either.

    On startup FileZilla, you will see its working field, which looks approximately like the one below. In this case, the contents of one of the computer drives you have selected opens on the left side, and on the right there will be the folders of the server on which your site is installed (the image can be enlarged by left-clicking on it).

    To create FTP connections in the top menu (first in order from left to right), left-click on the button that has this image:

    In the form that opens, select the button “ New site» and click on it with the left mouse button. Choose the name of the connection (site) as I described above. The image below shows a sample fill for connecting to the server that hosts this site.

    You need to fill everything in a similar way by entering the values ​​" Host», « Account», « Password», « User", taken from your hosting, in a manner similar to that described above. After entering your details, click right click mouse button " Connect", after which you will gain access to the hosting folders, and in the folder public_html– to the root of your site.

    To upload a folder or file to the root of your site, you need to find it on your disk in the left window of the manager that opens FileZilla, select with the left mouse button and after pressing the right button, select the option “ Upload to server».

    That's it for the FTP connection! As you can see, everything is painfully simple! Now let’s try to implement everything described in practice, if you have any questions, write in the comments - I’ll definitely answer them.

    You can simplify the work with Windows computers connected via a local network by activating FTP and TFTP servers, each of which has its own characteristics.

    Differences between FTP and TFTP servers

    Activating both servers will give you the ability to exchange files and commands between computers or devices connected to each other via a local network or other means.

    TFTP is an easier server to open, but does not support any identity verification other than ID verification. Because IDs can be spoofed, TFTP is not secure, but it is easy to use. For example, they are used to configure diskless workstations and smart network devices.

    FTP servers perform the same functions as TFTP, but have the ability to verify the authenticity of the connected device using a login and password, therefore they are more reliable. They can be used to send and receive files and commands.

    If your devices are connected through a router or use a Firewall, then you need to forward ports 21 and 20 for incoming and outgoing connections in advance.

    Creating and setting up TFTP on Windows 7

    To activate and configure it, it is best to use free program- tftpd32/tftpd64, which can be downloaded from the official developer website of the same name. The application is distributed in two forms: service and program. Each type is divided into versions for 32 and 64 bit system. You can use any type and version of the program that is most suitable for you, but below, as an example, actions will be given in a 64-bit program running as a service edition.

    Creating and setting up FTP

    1. Expand your computer's control panel.

      Launching the control panel

    2. Go to the "Programs" section.

      Go to the “Programs” section

    3. Go to the "Programs and Features" subsection.

      Go to the “Programs and Features” section

    4. Click on the “Turn components on or off” tab.

      Click on the “Turn components on or off” button

    5. In the window that opens, find the “IIS Services” tree and activate all the components included in it.

      Activating the IIS Services tree

    6. Save the result and wait until the included elements are added by the system.

      Wait for the components to be added by the system

    7. Return to the main Control Panel page and navigate to the System and Security section.

      Go to the “System and Security” section

    8. Go to the "Administration" subsection.

      Go to the “Administration” subsection

    9. Open Internet Information Services Manager.

      Open the Internet Information Services Manager program

    10. In the window that appears, go to the tree located on the left side of the program, right-click on the “Sites” subfolder and go to the “Add FTP site” function.

      Click on “Add FTP site”

    11. Fill in the field with the name of the site and write down the path to the folder to which received files will be sent.

      Come up with a name for the site and create a folder for it

    12. The FTP setup begins. In the IP address block, set the “All free” parameter, in the SLL block, set the “Without SSL” parameter. The “Start FTP site automatically” feature enabled will allow the server to turn on automatically every time you turn on the computer.

      We set the necessary parameters

    13. Authentication allows you to choose two options: anonymous - without a login and password, regular - with a login and password. Check the options that suit you.

      Choosing who will have access to the site

    14. This completes the creation of the site, but some more settings need to be completed.

      The site has been created and added to the list

    15. Return to the System and Security section and navigate to the Firewall subsection.

      Open the “Windows Firewall” section

    16. Open advanced options.

      Let's move on to additional settings firewall

    17. In the left half of the program, make the “Rules for incoming connections” tab active and activate the “FTP server” and “FTP server traffic in passive mode” functions by right-clicking on them and selecting the “Enable” option.

      Enable the “FTP server” and “FTP server traffic in passive mode” functions

    18. In the left half of the program, make the “Rules for outgoing connections” tab active and launch the “FTP Server Traffic” function using the same method.

      Enable the “FTP Server Traffic” function

    19. The next step is to create a new account, which will receive all rights to manage the server. To do this, return to the “Administration” section and select the “Computer Management” application in it.

      Open the Computer Management application

    20. While in the “Local Users and Groups” section, select the “Groups” subfolder and start creating another group in it.

      Click the “Create group” button

    21. Fill in all required fields with any data.

      Fill in information about the group being created

    22. Navigate to the Users subfolder and begin the process of creating a new user.

      Click the “New User” button

    23. Fill in all required fields and complete the process.

      Filling in user information

    24. Open the properties of the created user and expand the “Group Membership” tab. Click on the “Add” button and add the user to the group that you created a little earlier.

      Click the “Add” button

    25. Now navigate to the folder that is allocated for use by the FTP server. Open its properties and go to the “Security” tab, click on the “Change” button in it.

      Click the “Change” button

    26. In the window that opens, click on the “Add” button and add the group that was created earlier to the list.

      Select the action “Add allowing rule”

    27. Check the box next to “Specified roles or user groups” and fill in the field with the name of the previously registered group. Permissions must be granted for everything: read and write.

      Select “Specified roles or user groups”

    28. You can create another rule for all other users by selecting “All anonymous users” or “All users” and setting the permission to read only so that no one except you can edit the data stored on the server. Done, this completes the creation and configuration of the server.

      ftp://your_name:[email protected].

      To connect to the server not via a local network, but via the Internet, the same addresses are used, but the numbers 192.168.10.4 are replaced by the name of the site you created earlier. Let us remind you that to connect via the Internet received from the router, you need to forward ports 21 and 20.

      Reasons why it may not work

      The servers may not work correctly if you have not completed all the necessary settings described above or enter any data incorrectly, double-check all information. The second reason for failure is third-party factors: an incorrectly configured router, a Firewall built into the system or a third-party antivirus blocks access, rules installed on the computer interfere with the operation of the server. To solve a problem related to an FTP or TFTP server, you need to accurately describe at what stage it appeared, only then you will be able to find a solution on thematic forums.

      How to connect as a network drive

      To convert the folder allocated for the server to network drive standard Windows methods, just follow these steps:


      Third-party programs for setting up a server

      The program for managing TFTP - tftpd32/tftpd64, has already been described above in the article, in the section “Creation and TFTP setup server." For driving FTP servers You can use the FileZilla program.


      FTP and TFTP servers are designed to create local and shared sites that allow the exchange of files and commands between users with access to the server. Complete everything required settings possible both using the built-in functions of the system and through third party applications. To get some benefits, you can convert the server folder to a network drive.