龙空技术网

统信UOS服务器1060上安装部署ftp服务

鹏大师运维 50

前言:

当前同学们对“ftp账号怎么登录”可能比较注意,小伙伴们都想要知道一些“ftp账号怎么登录”的相关知识。那么小编同时在网络上收集了一些对于“ftp账号怎么登录””的相关内容,希望姐妹们能喜欢,大家快快来了解一下吧!

往期好文:统信UOS上使用右键刷新

hello,大家好啊,今天给大家带来一篇在统信UOS服务器1060上安装部署ftp服务,并配置匿名用户访问权限,在之前的文章中,我们讲过了在统信UOS服务器1050e上部署ftp统信服务器1050e安装配置FTP,配置非匿名用户登录,今天再给大家介绍一下匿名用户的配置。

1、登录服务器

C:\Users\rocli\Desktop>ssh root@192.168.118.140The authenticity of host '192.168.118.140 (192.168.118.140)' can't be established.ED25519 key fingerprint is SHA256:c1BupIX3+4/TA8AHlSuxBUpHmne7TY1GYJCi3J9Y5xw.This key is not known by any other namesAre you sure you want to continue connecting (yes/no/[fingerprint])? yesWarning: Permanently added '192.168.118.140' (ED25519) to the list of known hosts.UOS Server 20 1060eroot@192.168.118.140's password:Welcome to UOS Server 20Upgradable packages: 0Upgrade command line: yum upgradeActivate the web console with: systemctl enable --now cockpit.socketLast login: Thu Aug 31 10:32:41 2023 from 192.168.118.1Welcome to 4.19.90-2305.1.0.0199.56.uel20.x86_64System information as of time: 2023年 08月 31日 星期四 10:35:35 CSTSystem load: 0.09Processes: 236Memory used: 10.1%Swap used: 0.0%Usage On: 14%IP address: 192.168.118.140Users online: 2[root@localhost ~]#

2、下载安装vsftpd

[root@localhost ~]# dnf install vsftpd -yLast metadata expiration check: 0:11:54 ago on 2023年08月31日 星期四 10时33分12秒.Dependencies resolved.========================================================================================================================Package Architecture Version Repository Size========================================================================================================================Installing:vsftpd x86_64 3.0.3-32.uel20 UnionTechOS-Server-20-everything 89 kInstalling dependencies:vsftpd-help x86_64 3.0.3-32.uel20 UnionTechOS-Server-20-everything 68 kTransaction Summary========================================================================================================================Install 2 PackagesTotal download size: 157 kInstalled size: 339 kDownloading Packages:(1/2): vsftpd-help-3.0.3-32.uel20.x86_64.rpm 354 kB/s | 68 kB 00:00(2/2): vsftpd-3.0.3-32.uel20.x86_64.rpm 450 kB/s | 89 kB 00:00------------------------------------------------------------------------------------------------------------------------Total 778 kB/s | 157 kB 00:00UnionTechOS-Server-20-1060-everything 12 kB/s | 1.7 kB 00:00Importing GPG key 0x8DF595ED:Userid : "UnionTech <security@uniontech.com>"Fingerprint: C822 503F 2F4C E25A 6EA0 65BE 9055 A64E 8DF5 95EDFrom :  imported successfullyRunning transaction checkTransaction check succeeded.Running transaction testTransaction test succeeded.Running transactionPreparing : 1/1Installing : vsftpd-help-3.0.3-32.uel20.x86_64 1/2Installing : vsftpd-3.0.3-32.uel20.x86_64 2/2Running scriptlet: vsftpd-3.0.3-32.uel20.x86_64 2/2Verifying : vsftpd-3.0.3-32.uel20.x86_64 1/2Verifying : vsftpd-help-3.0.3-32.uel20.x86_64 2/2Installed:vsftpd-3.0.3-32.uel20.x86_64 vsftpd-help-3.0.3-32.uel20.x86_64Complete![root@localhost ~]#

3、启动vsftpd

[root@localhost ~]# systemctl start vsftpd[root@localhost ~]# systemctl enable vsftpdCreated symlink /etc/systemd/system/multi-user.target.wants/vsftpd.service → /usr/lib/systemd/system/vsftpd.service.[root@localhost ~]# systemctl status vsftpd● vsftpd.service - Vsftpd ftp daemonLoaded: loaded (/usr/lib/systemd/system/vsftpd.service; enabled; vendor preset: disabled)Active: active (running) since Thu 2023-08-31 10:45:54 CST; 9s agoMain PID: 36198 (vsftpd)Tasks: 1Memory: 448.0KCGroup: /system.slice/vsftpd.service└─36198 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf8月 31 10:45:53 localhost.localdomain systemd[1]: Starting Vsftpd ftp daemon...8月 31 10:45:54 localhost.localdomain systemd[1]: Started Vsftpd ftp daemon.[root@localhost ~]#

4、添加服务到防火墙

[root@localhost ~]# firewall-cmd --add-service=ftp --permanentsuccess[root@localhost ~]# firewall-cmd --reloadsuccess[root@localhost ~]#

5、修改/etc/vsftpd/vsftpd.conf配置

找到以下几行并进行相应的更改:

将 anonymous_enable 设置为 YES 以启用匿名访问。

将 local_enable 设置为 NO 禁止本地用户访问。

需要取消 anon_upload_enable 选项的注释,并设置为 YES。

要取消anon_mkdir_write_enable 选项的注释,并设置为 YES。

确保 write_enable 已经设置为 YES。

[root@localhost ~]# vi /etc/vsftpd/vsftpd.conf[root@localhost ~]# grep anonymous_enable /etc/vsftpd/vsftpd.confanonymous_enable=YES[root@localhost ~]# grep local_enable /etc/vsftpd/vsftpd.conflocal_enable=NO[root@localhost ~]# grep write_enable /etc/vsftpd/vsftpd.confwrite_enable=YESanon_mkdir_write_enable=YES[root@localhost ~]# grep anon_upload_enable /etc/vsftpd/vsftpd.confanon_upload_enable=YES[root@localhost ~]# grep anon_mkdir_write_enable /etc/vsftpd/vsftpd.confanon_mkdir_write_enable=YES[root@localhost ~]#

6、创建匿名用户登录的根路径

[root@localhost ~]# mkdir -p /var/ftp/pub[root@localhost ~]# chmod 777 /var/ftp/pub[root@localhost ~]# systemctl restart vsftpd[root@localhost ~]# systemctl status vsftpd● vsftpd.service - Vsftpd ftp daemonLoaded: loaded (/usr/lib/systemd/system/vsftpd.service; enabled; vendor preset: disabled)Active: active (running) since Thu 2023-08-31 11:39:43 CST; 7s agoProcess: 37067 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=0/SUCCESS)Main PID: 37068 (vsftpd)Tasks: 1Memory: 452.0KCGroup: /system.slice/vsftpd.service└─37068 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf8月 31 11:39:43 localhost.localdomain systemd[1]: Stopping Vsftpd ftp daemon...8月 31 11:39:43 localhost.localdomain systemd[1]: vsftpd.service: Succeeded.8月 31 11:39:43 localhost.localdomain systemd[1]: Stopped Vsftpd ftp daemon.8月 31 11:39:43 localhost.localdomain systemd[1]: Starting Vsftpd ftp daemon...8月 31 11:39:43 localhost.localdomain systemd[1]: Started Vsftpd ftp daemon.[root@localhost ~]#

7、在本服务器上安装客户端测试

[root@localhost ~]# dnf install ftpLast metadata expiration check: 0:08:16 ago on 2023年08月31日 星期四 10时45分09秒.Dependencies resolved.========================================================================================================================Package Architecture Version Repository Size========================================================================================================================Installing:ftp x86_64 0.17-81.uel20 UnionTechOS-Server-20-everything 44 kInstalling dependencies:ftp-help noarch 0.17-81.uel20 UnionTechOS-Server-20-everything 18 kTransaction Summary========================================================================================================================Install 2 PackagesTotal download size: 62 kInstalled size: 98 kIs this ok [y/N]: yDownloading Packages:(1/2): ftp-help-0.17-81.uel20.noarch.rpm 100 kB/s | 18 kB 00:00(2/2): ftp-0.17-81.uel20.x86_64.rpm 240 kB/s | 44 kB 00:00------------------------------------------------------------------------------------------------------------------------Total 332 kB/s | 62 kB 00:00Running transaction checkTransaction check succeeded.Running transaction testTransaction test succeeded.Running transactionPreparing : 1/1Installing : ftp-help-0.17-81.uel20.noarch 1/2Installing : ftp-0.17-81.uel20.x86_64 2/2Running scriptlet: ftp-0.17-81.uel20.x86_64 2/2Verifying : ftp-0.17-81.uel20.x86_64 1/2Verifying : ftp-help-0.17-81.uel20.noarch 2/2Installed:ftp-0.17-81.uel20.x86_64 ftp-help-0.17-81.uel20.noarchComplete![root@localhost ~]#

8、使用ftp连接测试

[root@localhost ~]# ftp 192.168.118.140Connected to 192.168.118.140 (192.168.118.140).220 (vsFTPd 3.0.3)Name (192.168.118.140:root): anonymous331 Please specify the password.Password:230 Login successful.Remote system type is UNIX.Using binary mode to transfer files.ftp> ls227 Entering Passive Mode (192,168,118,140,191,117).150 Here comes the directory listing.drwxrwxrwx 4 0 0 33 Aug 31 03:37 pub226 Directory send OK.ftp> cd pub250 Directory successfully changed.ftp> ls -ltr227 Entering Passive Mode (192,168,118,140,176,197).150 Here comes the directory listing.drwxrwxrwx 2 0 0 6 Aug 31 03:10 uploadsdrwx------ 2 14 50 6 Aug 31 03:37 test226 Directory send OK.ftp> mkdir anonymous257 "/pub/anonymous" createdftp> ls -ltr227 Entering Passive Mode (192,168,118,140,232,2).150 Here comes the directory listing.drwxrwxrwx 2 0 0 6 Aug 31 03:10 uploadsdrwx------ 2 14 50 6 Aug 31 03:37 testdrwx------ 2 14 50 6 Aug 31 03:41 anonymous226 Directory send OK.ftp>

9、在桌面系统上安装ftp客户端

10、匿名登录

11、传输文件测试

标签: #ftp账号怎么登录 #开机new cpu installed ftpm