Linux installation of ftp service (continued)

       The basic functions of the FTP service are implemented in the previous article "Linux Installation FTP Service", but it is an anonymous login method.

The main objectives of this article are:

Implements FTP upload to the directory specified by the specified user.

1. Practical stage

1.1. Using vi , open the /etc/vsftpd/vsftpd.conf file and remove the # before the content in the red box .

2.2. Specify the ftp folder. Add local_root=/var/ftp/pub to the end of etc/vsftpd/ vsftpd.conf file . 2.3. Use the command: getsebool -a | grep ftp to check whether the status of ftp_home_dir is on, if not, use the command: setsebool ftp_home_dir=on.


2.4. Use the command touch to create a file named chroot_list , use vi to edit the file, enter the user who needs to log in to ftp, upload the discovery and restart the vsftp service, command: service vsftpd restart .

 2. Test feedback and problem solving

 After testing, it is found that even if the permission to modify the upload path is 777, the upload cannot be successful. Later, it was found that since SELinux is in the open state, you can check the open state of SELinux through the command: getenforce (there are three working modes of SELinux: enforcing [enforced mode], permissive [allowed mode] and disabled [disabled mode]), as long as the setting becomes One of the latter two can be used, and the temporary setting does not require restarting the server command: setenforce 0 .

 

For more knowledge, see:

http://www.doc88.com/p-635728968846.html

http://www.cnblogs.com/xiaoluo501395377/archive/2013/05/26/3100444.html

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326174022&siteId=291194637