![]() We now create a file in the shared directory for subsequent verification touch /home/ftpuser/ftp1/1. Restart the following ftp servers before logging in service vsftpd restart Write the following configuration in the file local_root=/home/ftpuser/ftp1Īt this point, the configuration is complete Client login server Switch to user configuration directory mkdir -p /home/ftpuser/ftp1 Modify pam configuration file gedit /etc/pam.d/vsftpdĭelete all the contents of the file and replace the following configuration auth required /lib/x86_64-linux-gnu/security/pam_userdb.so db=/etc/vsftpd/virtusersĪccount required /lib/x86_64-linux-gnu/security/pam_userdb.so db=/etc/vsftpd/virtusers User_config_dir=/etc/vsftpd/virtualconf #Remember this pathĬreate a configuration folder to store the configuration of each userĬreate and store user password vi /etc/vsftpd/virtusersĭeposit the account and password in the fileĪt the same time, use the db command to generate database files db_load -T -t hash -f /etc/vsftpd/virtusers /etc/vsftpd/virtusers.db Guest_username=ftpuser #Consistent with the user name created earlier ![]() Modify overall configuration gedit /etc/nf Install the following tools to generate password account verification sudo apt install db-util Create accountĬreate an ftpuser account for the next experiment and modify the password useradd ftpuser -s /sbin/nologin Virtual users cannot log in to the Linux system, so as to make the system more secure and reliable. Virtual users do not have actual real system users, but realize access verification by mapping to one of the real users and setting corresponding permissions. Then we need to set up virtual users to log in, which is also the recommended way! This way is safer! The ftp can also be accessed in three ways Command line loginĪlthough the system user mode can control access, if there are too many users, it will affect the management of the server system and threaten the server security! And all we need is to use the FTP service built on the server! Restart after configuration service vsftpd restart Client login server For example, if my computer user is chy001, write chy001 in the file Write the user name that allows access gedit /etc/er_listĪdd your own user. Next, enter the address under the file manager in the window Īnd write the configuration anonymous_enable=NOĢ. Finally, you can see the file a.txt under the folderįirst, get the ip address of linux ifconfig Last input ls If the effect shown in the figure first appears, it means that the creation is successful Service vsftpd restart The client logs in to the server, Note: When you want to make sure your file transfers are secured, it is better to use SFTP (Secure File Transfer Protocol) over SSH. ![]() Software management mode service vsftpd start start-upĪnd write the configuration anonymous_enable=YESĪfter configuration, create folders and files and restart the server mkdir -p /data/pub Modifying permissions for the server user. Install the ftp server with the following command sudo apt install vsftpd ![]()
0 Comments
Leave a Reply. |