Configure the ftp server in suse

Source: Internet
Author: User
In suse, configure the ftp server-Linux Enterprise Application-Linux server application information. For more information, see. During the installation and configuration of FTP on Suse over the past two days, many problems have been encountered. Here is a summary:

I. Installation
Suse's graphical user interface is very good, so the installation process is relatively simple.

1. Open Yast, Software → Software Management;

2. The software manager that just started using Suse is very unaccustomed and cannot find the desired information. However, after a while, it is easier to classify it, it also provides more information for users. In Filter → Package Groups, in the tree list below, Productivity → Networking → Ftp, you can also expand the Ftp node and select the Servers node;

3. Select vsftpd from the software package list on the left, and click the Accept button below. A message is displayed, indicating that the disc is inserted;

4. After you insert the required disc, the system will automatically start installation. After installation is complete, you can view all vsftpd-related files on the File List option page below.

Ii. Start the service
After the installation is complete, vsftpd is started as an independent service and cannot be managed by xinetd. The system automatically adds a Service named vsftpd to the Service list. To start a service, follow these steps:

1. Yast → System Services (Run level );

2. Select vsftpd in the service list, click Enable at the bottom, start the service, and Finish.

Note: vsftpd may not be started when it is started, sometimes because the service on which it depends is not started, such as syslog. Select syslog and click Enable. If the xinetd service still cannot be started, restart the xinetd service and then start the vsftpd service.

Iii. Problems Encountered

1. Only anonymous users are allowed to log on
Symptom: During the ftp connection, enter the username and the username angel of the local machine. The following message is displayed: 530 This FTP server is anonymous only. Logon Failed.

Cause: After vsftpd is installed, the default value is anonymous FTP server, and only anonymous users are allowed to log on.

Solution: vsftpd has three server modes: anonymous mode, local mode, and virtual user mode. You need to modify the vsftpd configuration to local mode. The configuration file of vsftpd is located in the/etc/directory named vsftpd. conf. Many experts have analyzed and explained the configuration file in detail on the Internet, and the comments in the file are also detailed. I will not explain it one by one here. The following describes only the locations to be modified:

Remove the # Before local_enable = YES to make it available, indicating that local users are allowed to log on. Add the listen_port = 21 configuration item and set the listening port to 21. This step is optional, anonymous users are not allowed to log on. Change the value of anonymous_enable = YES to NO and set it as needed.

Restart the vsftpd service: service vsftpd restart. After the instance is started, log on to the local user angel and its password during the test. Note: The above test is performed on the local machine (or after logging on Using SSH.

2. Other machines cannot connect to the server
Symptom: After the local machine passes the test, use ftp 192.168.1.8 on another machine (Windows or Redhat) to connect to the server. The Connection closed by remote host or Connection timed out prompt is displayed, and the Connection fails.

Cause: The Suse firewall blocks access from external machines to the port used by FTP.

Solution: Open the firewall's restrictions on ports 20 and 21 used by FTP. The steps are as follows:

I> Yast → Security and Users → Firewall; ii> In the list on the left, select Allowed Services. What is surprising is that even if the FTP server is installed, there is no FTP service available in the Servces to Allow list, but SSH, HTTP, HTTPS, Samba and so on are all in the column, so use advanced settings. Click the Advanced button in the lower-right method to open the Advanced Settings dialog box. iii> enter 20 21 in TCP Ports. Note that the two port numbers are separated by spaces. OK; iv> Next → Accept, test again. The connection is successful. Use the angel and its password in the Suse system to log on.

Note: although some problems are encountered in Suse, they are still applicable to vsftpd configurations in other operating systems.
OpenSUSE comes with the following FTP server programs. You can choose one of them:

* Pure-ftpd
* Vsftpd
* Ftpd (included in the krb5-apps-servers package)

Vsftpd

Features

* It can be used in combination with xinetd.
* Security first design principles
* Small and lightweight Software

Install

* Search for and install vsftpd from YAST/software management. (On the installation disk)

Set

Vsftpd has two modes: independent mode and xinetd mode.
In standalone mode, you need to manually run the vsftpd command as the root user to start the FTP server after the startup. In xinetd mode, the FTP backend is not always running, only when a user sends an FTP request to your ftp server, the FTP server background program is started immediately. The latter needs to enable the xinetd service when the machine starts, which is the default setting in the SUSE/SLED series. Determine which mode you want to select and then set it later.

Xinetd Mode
* Open it in xinetd. You can manually edit the/etc/xinetd. d/vsftpd file to Change disabled yes to disabled no, or use commands to implement

Chkconfig vsftpd on * starts xinetd (if not run ).

/Etc/init. d/xinetd start * confirm that xinetd runs when the machine starts

Chkconfig xinetd on * root permission to edit the file/etc/vsftpd. conf. Make sure that # is added before listenYES #. If not, add SAVE.

Independent Mode
* The root permission is used to edit the file/etc/vsftpd. conf. Make sure there is no # Before listenYES #. If yes, remove and save.

Check the running status and firewall settings
* Check whether the FTP server is running normally. The default configuration file allows anonymous users to read-only and/srv/ftp/serves as the main directory for external FTP.
* If necessary, adjust the firewall settings. If you use the default SuSEFirewall2, In the YaST-system-/etc/sysconfig Editor, The network-SuSEfirewall2 adds ftp to FW_SERVICES_EXT_TCP, for example if you want to open ssh

FW_SERVICES_EXT_TCP "ftp ssh" * If you need passive mode FTP and nat, in YaST-system-/etc/sysconfig Editor, network-SuSEfirewall2

FW_LOAD_MODULES "ip_conntrack_ftp ip_nat_ftp"
After the instance is restarted, vsftpd runs in the selected mode.

Concise Configuration

Configure the/etc/vsftpd. conf file to be modified.
* Enable the write permission to the server and remove the previous line #

Write_enableYES * allow the local user to log on. Remove the line above #

Local_enableYES * by default, a user cannot access a directory other than his/her home directory. To disable it, remove the following line before #

Chroot_local_userNO * disable anonymous user logon

Anonymous_enableNO

Configuration File

*/Etc/logrotate. d/vsftpd
*/Etc/pam. d/vsftpd
*/Etc/vsftpd. conf
*/Etc/vsftpd. chroot_list
: This file contains the username that has permissions on all FTP content on the server. For other users, their home directories on the server are displayed as root directories.
*/Etc/shells
: Before allowing a local user to log on, the system checks whether a valid user shell exists by default. In case of PAM Authentication unavailability.
*/Etc/ftpusers
: This file contains * user names that prohibit * FTP login, usually including "root", "uucp", and "news", because these users have high permissions and are highly risky to log on to FTP due to misoperations.
1. log on to the system as root

2. Go to java.sun.com to download the rpm for JDK1.5.0 for LINUX. It should be a jdk-1_5_x-rc-linux-i586-rpm.bin File

3. Run the chmod + x jdk-1_5_x-rc-linux-i586-rpm.bin command to give it executable permissions

4. Through rpm? Ivh jdk-1_5_x-rc-linux-i586-rpm.bin for Installation

5. JDK is installed in the/usr/java/directory.

6. Set environment variables (write to/etc/profile)

Export JAVA_HOME =/usr/java/jdk1.5
Export PATH = $ PATH: $ JAVA_HOME/bin: $ JAVA_HOME/jre/bin
Export CLASSPATH =.:/usr/java/jdk1.5/lib:/usr/java/jdk1.5/jre/lib: $ CLASSPATH

Okay typed java-version. If the JDK version information is displayed, it indicates that the JDK version is successful.

For the convenience of development, I made another eclipse ide, so that I can develop JAVA in LINUX later.

ECLIPSE installation is much simpler. After downloading (a zip package), you can directly unzip it to the directory you want. I will decompress it to/opt.

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.