The problem of using VSFTPD to connect and unable to upload files under Centos 6.4 is resolved

Source: Internet
Author: User

published on April 13, 2014 by Scka, author

Recently built servers with Linux

Set up the FTP when the decision to use the VSFTP build, but there is no normal connection and unable to upload files and many other issues

After a long time of efforts, finally let vsftp normal operation

The following one by one gives my solution

1. Turn off the firewall

After installing the VSFTP with Yum and configuring it to finish booting, I found that I was not receiving a response when I connected to ftp locally.

It's not even a welcome message, it's a very unusual situation.

Check that the VSFTP configuration file is correct and the program is running properly

So I suspect that the firewall

1 Service iptables stop

Run the above command temporarily shut down the firewall, you can normally receive the system sent welcome message

2. Set permissions

I was using an account named Scka to connect to FTP, but I received the following feedback

oops:cannot Change Directory:/home/scka

From the error message, it should be the switch to the home directory/home/scka errors occurred, so I tried to execute the following command

1 chmod 777 /home/scka/

This should solve the problem after this operation, but still receive the error message

3. Set Sebool

It suddenly occurred to me that the Linux I was using turned on the Sebool by default, could it be blocked by the connection?

Then run the command below to get sebool all the settings for FTP

1 Getsebool -a| grep ftp

Sure enough, we found some problems.

Depending on the feedback, it seems that many of the settings for FTP are off, and I pay particular attention to the Ftp_home_dir, which seems to be related to the problem I have just appeared

Then try to run the following command to resolve

1 Setsebool ftp_home_dir 1

Restart VSFTPD, and then reconnect to FTP, sure enough to return to the home directory successfully!

However, the reboot will fail after this setting, we need to make a permanent setting

1 Setsebool -P ftp_home_dir 1

4, further solve the problem of unable to upload files

Connection on the FTP I again try to upload files, but again received an error message, no permissions

First think of permissions problem, run chmod 777 directory name after the problem is still

It suddenly occurred to me that a few options were off in the Sebool.

123 setsebool allow_ftpd_full_access 1 setsebool allow_ftpd_use_cifs 1 setsebool allow_ftpd_use_nfs 1

Use the above command to open them all, and then reconnect the FTP, the problem is solved perfectly

The problem of using VSFTPD to connect and unable to upload files under Centos 6.4 is resolved

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.