FTP dir or ls command cannot view file list what to do

Source: Internet
Author: User
Tags command line ftp firewall

Netizens may be using the FTP dir or LS command to view the file list, but can not see, is restricted, then cannot view the file list this caused us a lot of trouble, then how to solve this problem! Now let's have a look!

In the command line mode of the Win7 system, the dir or LS command using FTP cannot view the list of files, but it can be viewed using IE. After finding the relevant information, it boils down to two reasons:

Problem with Permissions

Windows comes with firewall blocking

After the experiment found that my situation belongs to the second type, the specific solution has the following several:

Shut down Windows Firewall directly

Turn on the firewall, but set the inbound rule to allow the Ftp.exe program to receive information

To set a rule by using the Netsh command

[Plain]

netsh advfirewall firewall add rule name= "FTP (NON-SSL)" program= "%systemroot%system32ftp.exe" Action=allow protocol= TCP Dir=in

netsh advfirewall set global statefulftp disable

Command 1 works the same as the second method

Command 2 is mainly used to prohibit statefulftp filtering, this article does not affect me, but it is recommended to add

Small episode

Here we refer to two related articles, using two similar but different commands, respectively.

[Plain]

Article 1

netsh advfirewall firewall add rule name= "FTP (NON-SSL)" Action=allow protocol=tcp dir=in localport=21

netsh advfirewall set global statefulftp Enable

[Plain]

Article 2

netsh advfirewall firewall add rule name= "FTP Service" Action=allow service=ftpsvc protocol=tcp dir=in

netsh advfirewall set global statefulftp disable

It is so tangled, for the article localport=21 always can not correspond to the Windows Ftp.exe program, and later use the tasklist command to find the corresponding PID number of FTP,

Then through the command netstat found that ftp.exe on their own computer on the original port is not 21.

And the article Service=ftpsvc also can not allow the exception of Ftp.exe, and later help the following Netsh command, found the program parameters, only to add the application path.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.