логи ftp сервера windows
Где посмотреть и как читать логи с ошибками сервера
Блоги, форумы, посадочные страницы и другие интернет-ресурсы представляют собой совокупность графического, текстового, аудио- и видео-контента, размещенного на веб-страницах в виде кода. Чтобы обеспечить к ним доступ пользователей через интернет, файлы размещают на серверах. Это аппаратное обеспечение (персональный компьютер или рабочая станция), на жестком диске которого и хранится код. Ключевые функции выполняются без участия человека, что актуально для всех типов оборудования, включая виртуальный выделенный сервер. Но это не означает, что контроль не осуществляется. Большинство событий, которые происходят при участии оборудования, пользователей и софта, включая ошибки, логи сервера фиксируют и сохраняют. Из этой статьи вы узнаете, что они собой представляют, зачем нужны, и как их читать.
Что такое логи
Это текстовые файлы, которые хранятся на жестком диске сервера. Создаются и заполняются в автоматическом режиме, в хронологическом порядке. В них записываются:
Посмотреть логи сервера может каждый, у кого есть к ним доступ, но непосвященному обывателю этот набор символов может показаться бессмысленным. Интерпретировать записи и получить пользу после прочтения проще профессионалу.
Классификация логов
Для каждой разновидности софта предусмотрены соответствующие файлы. Все логи сервера могут храниться на одном диске или даже на отдельном сервере. Существует довольно много разновидностей логов, вот наиболее распространенные:
Записи в системные журналы выполняет установленный софт.
Зачем нужны логи
Анализ логов сервера — неотъемлемая часть работы системного администратора или веб-разработчика. Обрабатывая их, специалисты получают массу полезных сведений. Используются в следующих целях:
После изучения информации можно получить точную статистику в виде сводных цифр, информацию о юзерах, выявить поведенческие закономерности пользовательских групп.
Check the FTP log
某些 Creative Cloud 应用程序、服务和功能在中国不可用。
The Site FTP log
When you connect to a server using Dreamweaver’s FTP feature, Dreamweaver generates an FTP log. This log lists the transactions that occurred between Dreamweaver and the server during the connection. To explain the transactions, the log displays line-by-line standard codes and commands.
Many FTP problems can be identified by reading the codes and commands in this log. Below you’ll find information that will assist you in reviewing and interpreting FTP logs, as well as links to Macromedia TechNotes, which offer troubleshooting tips for specific FTP difficulties:
| Accessing the Site FTP log. |
| An FTP log example. |
| FTP codes and actions. |
| Common FTP commands. |
Accessing the Site FTP log
Windows |
In the Site window, choose Advanced > FTP log.
In the Site window, choose Advanced > FTP log.
An FTP log example
In the sample FTP log below, you’ll see numbers (such as 220) that are referred to as «series codes.» Interspersed throughout the series codes are commands (such as MKD).
220 ftp.macromedia.com FTP server (ms-ftpd(16) Thu Feb 27 18:32:59 EST 1997) ready.
USER jmacro
331 Password required for jmacro
PASS
230-Checking disk usage, please wait.
230-
230- Your disk quota is: 5.00 megabytes.
230- Your disk usage is:
230- Home/WWW: 1.23 megabytes
230- FTP: 0.00 megabytes
230- Total: 1.23 megabytes (25% of quota)
230-
230 User jmacro@macromedia.com logged in.
SYST
215 UNIX Type: L8 Version: BSD-198911
PWD
257 «/jmacro» is current directory.
MKD XYIZNWSK
257 MKD command successful.
TYPE A
200 Type set to A.
PORT 10,11,1,80,18,238
200 PORT command successful.
LIST
150 Opening ASCII mode data connection for /bin/ls
FTP codes and actions
The series code (the number) at the beginning of some lines of the FTP log describes the action that took place between your computer and the server in the FTP process. The table below offers a description of these FTP codes and actions.
FTP series codes
Code | Description |
100 Series Codes | The requested action is being initiated, expect another reply before proceeding with a new command. |
110 | Restart marker reply. |
120 | Service ready in nnn minutes. |
125 | Data connection already open, transfer starting. |
150 | File status okay, about to open data connection. |
200 Series Codes | The requested action has been successfully completed. |
200 | Command okay. |
202 | Command not implemented, superfluous at this site. |
211 | System status, or system help reply. |
212 | Directory status. |
213 | File status. |
214 | Help message. |
215 | NAME system type. (Where NAME is an official system name from the list in the Assigned Numbers document.) |
220 | Service ready for new user. |
221 | Service closing control connection. Logged out if appropriate. |
225 | Data connection open; no transfer in progress. |
226 | Closing data connection. Requested file action successful (for example, file transfer or file abort). |
227 | Entering Passive Mode |
230 | User logged in, proceed. |
250 | Requested file action okay, completed. |
257 | «PATHNAME» created. |
300 Series Codes | The command has been accepted, but the requested action is being held in abeyance, pending receipt of further information. |
331 | User name okay, need password. |
332 | Need account for login. |
350 | Requested file action pending further information. |
400 Series Codes | The command was not accepted and the requested action did not take place, but the error condition is temporary and the action may be requested again. |
401 | This service is not accepting users now. User quota filled. Try again later. |
421 | Service not available, closing control connection. This may be a reply to any command if the service knows it must shut down. |
425 | Can’t open data connection. |
426 | Connection closed; transfer aborted. |
431 | Log-in unsuccessful. User name and/or password invalid. |
450 | Requested file action not taken. File unavailable (e.g., file busy). |
451 | Requested action aborted: local error in processing. |
452 | Requested action not taken. Insufficient storage space in system. |
453 | File transfer incomplete. Insufficient storage space. |
500 Series Codes | The command was not accepted and the requested action did not take place. |
500 | Syntax error, command unrecognized. This may include errors such as command line too long. |
501 | Syntax error in parameters or arguments. |
502 | Command not implemented. |
503 | Bad sequence of commands. |
504 | Command not implemented for that parameter. |
530 | Not logged in. |
532 | Need account for storing files. |
550 | Requested action not taken. File unavailable (e.g., file not found, no access). |
552 | Requested file action aborted. Exceeded storage allocation (for current directory or dataset). |
553 | Requested action not taken. File name not allowed. |
Note: Bear in mind that some of these codes may have different meanings with different servers.
Common FTP commands
Some text commands describe actions, as explained in the following table:
Default FTP Log Files Settings
Overview
The element is used to configure the default activity logging options for an FTP server.
For example, you can enable or disable logging, specify the categories of information to store in the log file, and change the directory where the log file is stored. You can also use the element to control how often IIS creates a new log file based either on log file size or time interval and the maximum size (in bytes) that a log file can become.
Unlike Web sites that can use the IIS, NCSA, or W3C format for log files, the FTP 7 service only stores log files in W3C format.
Compatibility
Version | Notes |
---|---|
IIS 10.0 | The element was not modified in IIS 10.0. |
IIS 8.5 | The element was not modified in IIS 8.5. |
IIS 8.0 | The element was not modified in IIS 8.0. |
IIS 7.5 | The element of the element ships as a feature of IIS 7.5. |
IIS 7.0 | The element of the element was introduced in FTP 7.0, which was a separate download for IIS 7.0. |
IIS 6.0 | N/A |
The FTP 7.0 and FTP 7.5 services shipped out-of-band for IIS 7.0, which required downloading and installing the modules from the following URL:
With Windows 7 and Windows Server 2008 R2, the FTP 7.5 service ships as a feature for IIS 7.5, so downloading the FTP service is no longer necessary.
Setup
To support FTP publishing for your Web server, you must install the FTP service. To do so, use the following steps.
Windows Server 2012 or Windows Server 2012 R2
On the taskbar, click Server Manager.
In Server Manager, click the Manage menu, and then click Add Roles and Features.
In the Add Roles and Features wizard, click Next. Select the installation type and click Next. Select the destination server and click Next.
On the Server Roles page, expand Web Server (IIS), and then select FTP Server.
Click Next, and then on the Select features page, click Next again.
On the Confirm installation selections page, click Install.
On the Results page, click Close.
Windows 8 or Windows 8.1
On the Start screen, move the pointer all the way to the lower left corner, right-click the Start button, and then click Control Panel.
In Control Panel, click Programs and Features, and then click Turn Windows features on or off.
Expand Internet Information Services, and then select FTP Server.
To support ASP.Membership authentication or IIS Manager authentication for the FTP service, you will also need to select FTP Extensibility.
Click OK.
Click Close.
Windows Server 2008 R2
On the taskbar, click Start, point to Administrative Tools, and then click Server Manager.
In the Server Manager hierarchy pane, expand Roles, and then click Web Server (IIS).
In the Web Server (IIS) pane, scroll to the Role Services section, and then click Add Role Services.
On the Select Role Services page of the Add Role Services Wizard, expand FTP Server.
Select FTP Service.
To support ASP.Membership authentication or IIS Manager authentication for the FTP service, you will also need to select FTP Extensibility.
Click Next.
On the Confirm Installation Selections page, click Install.
On the Results page, click Close.
Windows 7
On the taskbar, click Start, and then click Control Panel.
In Control Panel, click Programs and Features, and then click Turn Windows Features on or off.
Expand Internet Information Services, and then FTP Server.
Select FTP Service.
To support ASP.Membership authentication or IIS Manager authentication for the FTP service, you will also need to select FTP Extensibility.
Click OK.
Windows Server 2008 or Windows Vista
Download the installation package from the following URL:
Follow the instructions in the following walkthrough to install the FTP service:
How To
How to configure the default logging options for an FTP server
Open Internet Information Services (IIS) Manager:
If you are using Windows Server 2012 or Windows Server 2012 R2:
If you are using Windows 8 or Windows 8.1:
If you are using Windows Server 2008 or Windows Server 2008 R2:
If you are using Windows Vista or Windows 7:
In the Connections pane, click the server name where you want to configure logging.
Select the fields for your log files, then click OK.
Under Directory, specify the path where the log file should be stored. The default is %SystemDrive%\inetpub\logs\LogFiles.
In the Log File Rollover section, specify the following options:
Schedule: to create new log file that are based on one of the following values:
Maximum file size (in bytes): to create a new log file when the file reaches a certain size (in bytes). The minimum file size is 1048576 bytes. If this attribute is set to a value less than 1048576 bytes, the default value is implicitly assumed as 1048576 bytes.
Do not create a new log file: there is a single log file that will continue to grow as information is logged.
Select Use local time for file naming and rollover to specify that log file naming and time for log file rollover uses the local server time. When this is not selected, Coordinated Universal Time (UTC) is used.
Click Apply in the Actions pane.
Configuration
Attributes
Attribute | Description |
---|---|
directory | Optional string attribute. |
Specifies the logging directory, where the log file and logging-related support files are stored.
true if logging is enabled; otherwise false.
true if the a new log file is created based on local time; otherwise, false for Coordinated Universal Time (UTC), which was previously called Greenwich Mean Time (GMT).
Note: Regardless of the setting, the time stamp for each W3C Extended Logging log record is UTC-based.
Specifies the categories of information that are written to either the log file (when you use W3C Extended log file format) or to the ODBC data source during logging events for a site. The logExtFileFlags attribute can be one or more of the following values. If you specify more than one value, separate them with a comma (,).
Specifies how often the FTP service creates a new log file. The period attribute can be one of the following possible values.
Specifies the verbosity for FTP logging.
Specifies the maximum size of the log file (in bytes) after which to create a new log file. This value is only applicable when MaxSize is chosen for the period attribute. The minimum file size is 1,048,576 bytes. If this attribute is set to a value less than 1,048,576 bytes, the default value is implicitly assumed as 1,048,576 bytes.
Child Elements
Configuration Sample
The following configuration sample displays an example element for a server that enables logging by default with daily log file rollovers.
Sample Code
The following code samples illustrate how to enable logging by default with daily log file rollovers.
FTP Log Files
Overview
The element is used to configure the activity logging options for an FTP site.
For example, you can enable or disable logging, specify the categories of information to store in the log file, and change the directory where the log file is stored. You can also use the element to control how often IIS creates a new log file based either on log file size or time interval and the maximum size (in bytes) that a log file can become.
Unlike Web sites that can use the IIS, NCSA, or W3C format for log files, the FTP 7 service only stores log files in W3C format.
Compatibility
Version | Notes |
---|---|
IIS 10.0 | The element was not modified in IIS 10.0. |
IIS 8.5 | The element was not modified in IIS 8.5. |
IIS 8.0 | The element was not modified in IIS 8.0. |
IIS 7.5 | The element of the element ships as a feature of IIS 7.5. |
IIS 7.0 | The element of the element was introduced in FTP 7.0, which was a separate download for IIS 7.0. |
IIS 6.0 | N/A |
The FTP 7.0 and FTP 7.5 services shipped out-of-band for IIS 7.0, which required downloading and installing the modules from the following URL:
With Windows 7 and Windows Server 2008 R2, the FTP 7.5 service ships as a feature for IIS 7.5, so downloading the FTP service is no longer necessary.
Setup
To support FTP publishing for your Web server, you must install the FTP service. To do so, use the following steps.
Windows Server 2012 or Windows Server 2012 R2
On the taskbar, click Server Manager.
In Server Manager, click the Manage menu, and then click Add Roles and Features.
In the Add Roles and Features wizard, click Next. Select the installation type and click Next. Select the destination server and click Next.
On the Server Roles page, expand Web Server (IIS), and then select FTP Server.
Click Next, and then on the Select features page, click Next again.
On the Confirm installation selections page, click Install.
On the Results page, click Close.
Windows 8 or Windows 8.1
On the Start screen, move the pointer all the way to the lower left corner, right-click the Start button, and then click Control Panel.
In Control Panel, click Programs and Features, and then click Turn Windows features on or off.
Expand Internet Information Services, and then select FTP Server.
To support ASP.Membership authentication or IIS Manager authentication for the FTP service, you will also need to select FTP Extensibility.
Click OK.
Click Close.
Windows Server 2008 R2
On the taskbar, click Start, point to Administrative Tools, and then click Server Manager.
In the Server Manager hierarchy pane, expand Roles, and then click Web Server (IIS).
In the Web Server (IIS) pane, scroll to the Role Services section, and then click Add Role Services.
On the Select Role Services page of the Add Role Services Wizard, expand FTP Server.
Select FTP Service.
To support ASP.Membership authentication or IIS Manager authentication for the FTP service, you will also need to select FTP Extensibility.
Click Next.
On the Confirm Installation Selections page, click Install.
On the Results page, click Close.
Windows 7
On the taskbar, click Start, and then click Control Panel.
In Control Panel, click Programs and Features, and then click Turn Windows Features on or off.
Expand Internet Information Services, and then FTP Server.
Select FTP Service.
To support ASP.Membership authentication or IIS Manager authentication for the FTP service, you will also need to select FTP Extensibility.
Click OK.
Windows Server 2008 or Windows Vista
Download the installation package from the following URL:
Follow the instructions in the following walkthrough to install the FTP service:
How To
How to configure logging options for an FTP site
Open Internet Information Services (IIS) Manager:
If you are using Windows Server 2012 or Windows Server 2012 R2:
If you are using Windows 8 or Windows 8.1:
If you are using Windows Server 2008 or Windows Server 2008 R2:
If you are using Windows Vista or Windows 7:
In the Connections pane, expand the server name, and then go to the site where you want to configure logging.
Select the fields for your log files, then click OK.
Under Directory, specify the path where the log file should be stored. The default is %SystemDrive%\inetpub\logs\LogFiles.
In the Log File Rollover section, specify the following options:
Schedule: to create new log file that are based on one of the following values:
Maximum file size (in bytes): to create a new log file when the file reaches a certain size (in bytes). The minimum file size is 1048576 bytes. If this attribute is set to a value less than 1048576 bytes, the default value is implicitly assumed as 1048576 bytes.
Do not create a new log file: there is a single log file that will continue to grow as information is logged.
Select Use local time for file naming and rollover to specify that log file naming and time for log file rollover uses the local server time. When this is not selected, Coordinated Universal Time (UTC) is used.
Click Apply in the Actions pane.
Configuration
Attributes
Attribute | Description |
---|---|
directory | Optional string attribute. |
Specifies the logging directory, where the log file and logging-related support files are stored.
true if logging is enabled; otherwise false.
true if the a new log file is created based on local time; otherwise, false for Coordinated Universal Time (UTC), which was previously called Greenwich Mean Time (GMT).
Note: Regardless of the setting, the time stamp for each W3C Extended Logging log record is UTC-based.
Specifies the categories of information that are written to either the log file (when you use W3C Extended log file format) or to the ODBC data source during logging events for a site. The logExtFileFlags attribute can be one or more of the following values. If you specify more than one value, separate them with a comma (,).
Specifies how often the FTP service creates a new log file. The period attribute can be one of the following possible values.
Specifies the verbosity for FTP logging.
Specifies the maximum size of the log file (in bytes) after which to create a new log file. This value is only applicable when MaxSize is chosen for the period attribute. The minimum file size is 1,048,576 bytes. If this attribute is set to a value less than 1,048,576 bytes, the default value is implicitly assumed as 1,048,576 bytes.
Child Elements
Configuration Sample
The following configuration example shows an FTP with custom logging options that specify that infrastructure commands will not be logged, log files will be rotated on a daily basis, and the additional debugging option has been added to the default fields.
Sample Code
The following examples illustrate enabling logging for an FTP site, configuring the log file directory for an FTP site for a specific path, and specifying daily log file recycling.