Solution for centosftp service failure

Source: Internet
Author: User
The centosftp service cannot be used. First, you must enable the vsftpd service on the centos server. By default, the vsftpd service is disabled. The simplest way is to enable the vsftpd service through services on the GUI. After the vsftpd service is enabled, the centos ftp service cannot be used. First, you must enable the vsftpd service on the centos server. By default, the vsftpd service is disabled. The simplest way is to enable the vsftpd service through services on the GUI. When the vsftpd service is enabled, an error is returned. In general, the following error is reported. This means that the user's home directory cannot be accessed. SELinux is preventing the ftp daemon from reading users home directories (home ).

Solution: according to the official documentation, setsebool-P ftp_home_dir = 1 (you only need to execute this command to use it). when you execute the above command, the following error will be reported: bash: setsebool: command not found solution: 1: [root @ bradydreamer brady] # find/-name "setsebool"/usr/sbin/setsebool [root @ bradydreamer ~] # Export PATH = $ PATH:/usr/sbin [root @ bradydreamer ~] # Echo $ PATH/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/sbin: /usr/X11R6/bin:/usr/sbin [root @ jboss01 sbin] # setsebool-P ftp_home_dir = 1 2: [root @ jboss01 sbin] # cd/usr/sbin [root @ jboss01 sbin] #. /setsebool-P ftp_home_dir = 1 both methods can solve this problem. In this way, the FTP service can be used. You do not need to restart the server or vsftpd service. To restart the ftp service, run the following command: [root @ jboss01 sbin] #./sbin/service vsftpd restart to restart the FTP service. In addition, if you want to check what permissions ftp has enabled, you can run the following command: [root @ jboss01 sbin] # getsebool-a | grep ftp of course, this command is also enabled in the/usr/sbin Directory. to disable the ftp server, run the following command: 1. start the Command/etc/init. d/vsftpd start stop restart. /sbin/service vsftpd start stop restart

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.