Install and Configure FTP in ubuntu

Source: Internet
Author: User
Tags ftp login

Install and Configure FTP in ubuntu 12.04 and install the FTP software in Ubuntu. Of course, you can choose the well-known vsftpd (very secure FTP daemon). It is very easy to install vsftpd In Ubuntu. Just run the following command: during the execution of the sudo apt-get install vsftpd command, the installer creates a user group named "ftp" locally. After the command is executed, the FTP service is automatically started. You can run the "netstat-tl" command to check whether the FTP port has been opened, or directly enter "ftp: // your server IP address (the newly installed vsftpd can be accessed anonymously without a password by default). If you can directly connect to the FTP server, installing vsftpd is a success. Enabling, stopping, and restarting the vsftpd service is also simple: service vsftpd start | stop | restart the newly installed vsftpd can be accessed anonymously by default, if you only want to grant a user the permission to access a specific directory, you must modify the vsftpd configuration. First, create a user dedicated for access, such as "test": mkdir-p/home/testsudo useradd-g ftp-d/home/test-M test PS: to delete a user, run the following command: sudo userdel test to set the password: passwd test to modify the vsftpd configuration file vi/etc/vsftpd. conf ": # prohibit Anonymous Access Authorization = NO # accept local user local_enable = YES # upload write_enable = YESlocal_umask = 022 # enable chroot_list_file to access only the root directory chroot_list_enable = YESchroot_list_file =/etc/vsftpd. chroot_list in/etc/vsftpd. chroot_list: echo "te St "> vi/etc/vsftpd. if chroot is enabled for chroot_list "500 OOPS: vsftpd: refusing to run with writable root inside chroot ()", the root directory should be set to non-writable, which is the protection mechanism of vsftp. Chmod a-w/home/test: After you log on to FTP, you can access things under test, but you cannot upload files. If you set the "test" folder to "777", FTP login fails. So the solution is. Create a folder named "/home/test/wwwroot" under the "test" folder and set "wwwroot" to "777". Then, upload the content to the "wwwroot" folder. OK. After vsftpd is restarted, you can use the newly created account to access the service.

Related Article

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.