当前位置: 首页 > news >正文

LINUX 623 FTP回顾

FTP

权限 /etc/vsftpd/vsftpd.conf

anonymous_enable=NO local_enable=NO

服务器 .20

[root@web vsftpd]# grep -v ^# vsftpd.conf
anonymous_enable=NO
local_enable=YES
local_root=/data/kefu2
chroot_local_user=YES
allow_writeable_chroot=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=NO
listen_ipv6=YESpam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES

客户端.100

[root@nfs ~]# ftp 192.168.235.20
Connected to 192.168.235.20 (192.168.235.20).
220 (vsFTPd 3.0.2)
Name (192.168.235.20:root): ftp
331 Please specify the password.
Password:
530 Login incorrect.
Login failed.
[root@nfs ~]# ftp 192.168.235.20
Connected to 192.168.235.20 (192.168.235.20).
220 (vsFTPd 3.0.2)
Name (192.168.235.20:root): anonymous
331 Please specify the password.
Password:
530 Login incorrect.
Login failed.
ftp>

服务端

[root@web vsftpd]# grep -v ^# vsftpd.conf
anonymous_enable=NO
local_enable=NO
local_root=/data/kefu2
chroot_local_user=YES
allow_writeable_chroot=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=NO
listen_ipv6=YESpam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
[root@web vsftpd]# systemctl restart vsftpd
您在 /var/spool/mail/root 中有邮件
[root@web vsftpd]#

local_enable=NO
客户端

[root@nfs ~]# ftp 192.168.235.20
Connected to 192.168.235.20 (192.168.235.20).
500 OOPS: vsftpd: both local and anonymous access disabled!
ftp>

500 OOPS: vsftpd: both local and anonymous access disabled!在这里插入图片描述
.20服务端

[root@web vsftpd]# vim vsftpd.conf
您在 /var/spool/mail/root 中有邮件
[root@web vsftpd]# grep -v ^# vsftpd.conf
anonymous_enable=NO
local_enable=yes
local_root=/data/kefu2
chroot_local_user=YES
allow_writeable_chroot=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=NO
listen_ipv6=YESpam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
[root@web vsftpd]# systemctl restart vsftpd
您在 /var/spool/mail/root 中有邮件
[root@web vsftpd]#

.100客户端

[root@nfs ~]# ftp 192.168.235.20
Connected to 192.168.235.20 (192.168.235.20).
220 (vsFTPd 3.0.2)
Name (192.168.235.20:root): jerry
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

anonymous_enable=YES local_enable=yes

服务端


[root@web vsftpd]# grep -v ^# vsftpd.conf
anonymous_enable=YES
local_enable=yes
local_root=/data/kefu2
chroot_local_user=YES
allow_writeable_chroot=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=NO
listen_ipv6=YESpam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
[root@web vsftpd]# systemctl restart vsftpd
[root@web vsftpd]#

客户端

[root@nfs ~]# ftp 192.168.235.20
Connected to 192.168.235.20 (192.168.235.20).
220 (vsFTPd 3.0.2)
Name (192.168.235.20:root): jerry
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> bye
221 Goodbye.
[root@nfs ~]# ftp 192.168.235.20
Connected to 192.168.235.20 (192.168.235.20).
220 (vsFTPd 3.0.2)
Name (192.168.235.20:root): ftp
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (192,168,235,20,117,99).
150 Here comes the directory listing.
drwxr-xr-x    2 0        0               6 Oct 13  2020 pub
226 Directory send OK.
ftp> cd /
250 Directory successfully changed.
ftp> ls
227 Entering Passive Mode (192,168,235,20,36,136).
150 Here comes the directory listing.
drwxr-xr-x    2 0        0               6 Oct 13  2020 pub
226 Directory send OK.
ftp>

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

anonymous=YES local_enable=no

服务端


[root@web vsftpd]# vim vsftpd.conf
您在 /var/spool/mail/root 中有邮件
[root@web vsftpd]# grep -v ^# vsftpd.conf
anonymous_enable=yes
local_enable=no
local_root=/data/kefu2
chroot_local_user=YES
allow_writeable_chroot=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=NO
listen_ipv6=YESpam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
[root@web vsftpd]# systemctl restart vsftpd
您在 /var/spool/mail/root 中有邮件
[root@web vsftpd]#

客户端


[root@nfs ~]# ftp 192.168.235.20
Connected to 192.168.235.20 (192.168.235.20).
220 (vsFTPd 3.0.2)
Name (192.168.235.20:root): ftp
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (192,168,235,20,56,11).
150 Here comes the directory listing.
drwxr-xr-x    2 0        0               6 Oct 13  2020 pub
226 Directory send OK.
ftp> cd /
250 Directory successfully changed.
ftp> ls
227 Entering Passive Mode (192,168,235,20,175,97).
150 Here comes the directory listing.
drwxr-xr-x    2 0        0               6 Oct 13  2020 pub
226 Directory send OK.
ftp> bye
221 Goodbye.
[root@nfs ~]# ftp 192.168.235.20
Connected to 192.168.235.20 (192.168.235.20).
220 (vsFTPd 3.0.2)
Name (192.168.235.20:root): jerry
530 This FTP server is anonymous only.
Login failed.
ftp> bye
221 Goodbye.
[root@nfs ~]# ftp 192.168.235.20
Connected to 192.168.235.20 (192.168.235.20).
220 (vsFTPd 3.0.2)
Name (192.168.235.20:root): anonymous
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (192,168,235,20,167,2).
150 Here comes the directory listing.
drwxr-xr-x    2 0        0               6 Oct 13  2020 pub
226 Directory send OK.
ftp> cd /
250 Directory successfully changed.
ftp> sl
?Invalid command
ftp> ls
227 Entering Passive Mode (192,168,235,20,255,140).
150 Here comes the directory listing.
drwxr-xr-x    2 0        0               6 Oct 13  2020 pub
226 Directory send OK.
ftp>

local_root=// chroot_local_user=yes

在这里插入图片描述

500 oops allow_writeable_chroot=yes

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

给一部分用户开启非禁锢权限

在这里插入图片描述

echo kefu >> /etc/vsftpd/chroot_list

192.168.235.20

root@192.168.235.20's password:┌────────────────────────────────────────────────────────────────────┐│                        • MobaXterm 20.0 •                          ││            (SSH client, X-server and networking tools)             ││                                                                    ││ ➤ SSH session to root@192.168.235.20                               ││   • SSH compression : ✘                                            ││   • SSH-browser     : ✔                                            ││   • X11-forwarding  : ✔  (remote display is forwarded through SSH) ││   • DISPLAY         : ✔  (automatically set on remote server)      ││                                                                    ││ ➤ For more info, ctrl+click on help or visit our website           │└────────────────────────────────────────────────────────────────────┘Last login: Thu Jun 19 20:04:55 2025 from 192.168.235.1
[root@web ~]# cd /etc/vsftpd
[root@web vsftpd]# ls
ftpusers  user_list  vsftpd.conf  vsftpd_conf_migrate.sh
[root@web vsftpd]# cat vsftpd.conf
# Example config file /etc/vsftpd/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
# When SELinux is enforcing check for SE bool ftp_home_dir
local_enable=YES
local_root=/data/kefu2
chroot_local_user=YES
# Uncomment this to enable any form of FTP write command.
allow_writeable_chroot=YES
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
# When SELinux is enforcing check for SE bool allow_ftpd_anon_write, allow_ftpd_full_access
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/xferlog
#
# If you want, you can have your log file in standard ftpd xferlog format.
# Note that the default log file location is /var/log/xferlog in this case.
xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode. The vsftpd.conf(5) man page explains
# the behaviour when these options are disabled.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
#ftpd_banner=Welcome to blah FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd/banned_emails
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
# (Warning! chroot'ing can be very dangerous. If using chroot, make sure that
# the user does not have write access to the top level directory within the
# chroot)
#chroot_local_user=YES
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd/chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
#
# When "listen" directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.
listen=NO
#
# This directive enables listening on IPv6 sockets. By default, listening
# on the IPv6 "any" address (::) will accept connections from both IPv6
# and IPv4 clients. It is not necessary to listen on *both* IPv4 and IPv6
# sockets. If you want that (perhaps because you want to listen on specific
# addresses) then you must run two copies of vsftpd with two configuration
# files.
# Make sure, that one of the listen options is commented !!
listen_ipv6=YESpam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
您在 /var/spool/mail/root 中有新邮件
[root@web vsftpd]# gerp -v ^# vsftpd.conf
bash: gerp: 未找到命令...
相似命令是: 'grep'
[root@web vsftpd]# grep -v ^# vsftpd.conf
anonymous_enable=NO
local_enable=YES
local_root=/data/kefu2
chroot_local_user=YES
allow_writeable_chroot=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=NO
listen_ipv6=YESpam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
[root@web vsftpd]# man 5 vsftpd.conf
您在 /var/spool/mail/root 中有邮件
[root@web vsftpd]# tail -10 /etc/passwd
cw02:x:1014:1224::/home/cw02:/bin/bash
sc02:x:1015:1226::/home/sc02:/bin/bash
rs02:x:1016:1225::/home/rs02:/bin/bash
harry:x:1017:1017::/home/mahei/redhat/harry:/bin/bash
netasha:x:1018:1018::/home/netasha:/bin/bash
sarsh:x:1019:1228::/home/sarsh:/bin/bash
OOO:x:1020:1020::/home/OOO:/bin/bash
jerry:x:1021:1229::/home/jerry:/bin/bash
kefu:x:1022:1022::/home/kefu:/bin/bash
kefu2:x:1023:1023::/home/kefu2:/bin/bash
您在 /var/spool/mail/root 中有邮件
[root@web vsftpd]# vim vsftpd.conf
您在 /var/spool/mail/root 中有邮件
[root@web vsftpd]# gerp -v ^# vsftpd.conf
bash: gerp: 未找到命令...
相似命令是: 'grep'
[root@web vsftpd]# grep -v ^# vsftpd.conf
anonymous_enable=NO
local_enable=NO
local_root=/data/kefu2
chroot_local_user=YES
allow_writeable_chroot=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=NO
listen_ipv6=YESpam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
[root@web vsftpd]# systemctl restart vsftpd
您在 /var/spool/mail/root 中有邮件
[root@web vsftpd]# vim vsftpd.conf
您在 /var/spool/mail/root 中有邮件
[root@web vsftpd]# grep -v ^# vsftpd.conf
anonymous_enable=NO
local_enable=yes
local_root=/data/kefu2
chroot_local_user=YES
allow_writeable_chroot=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=NO
listen_ipv6=YESpam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
[root@web vsftpd]# systemctl restart vsftpd
您在 /var/spool/mail/root 中有邮件
[root@web vsftpd]# vim vsftpd.conf
您在 /var/spool/mail/root 中有邮件
[root@web vsftpd]# cat vsftpd.conf
# Example config file /etc/vsftpd/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES
#
# Uncomment this to allow local users to log in.
# When SELinux is enforcing check for SE bool ftp_home_dir
local_enable=yes
local_root=/data/kefu2
chroot_local_user=YES
# Uncomment this to enable any form of FTP write command.
allow_writeable_chroot=YES
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
# When SELinux is enforcing check for SE bool allow_ftpd_anon_write, allow_ftpd_full_access
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/xferlog
#
# If you want, you can have your log file in standard ftpd xferlog format.
# Note that the default log file location is /var/log/xferlog in this case.
xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode. The vsftpd.conf(5) man page explains
# the behaviour when these options are disabled.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
#ftpd_banner=Welcome to blah FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd/banned_emails
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
# (Warning! chroot'ing can be very dangerous. If using chroot, make sure that
# the user does not have write access to the top level directory within the
# chroot)
#chroot_local_user=YES
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd/chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
#
# When "listen" directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.
listen=NO
#
# This directive enables listening on IPv6 sockets. By default, listening
# on the IPv6 "any" address (::) will accept connections from both IPv6
# and IPv4 clients. It is not necessary to listen on *both* IPv4 and IPv6
# sockets. If you want that (perhaps because you want to listen on specific
# addresses) then you must run two copies of vsftpd with two configuration
# files.
# Make sure, that one of the listen options is commented !!
listen_ipv6=YESpam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
[root@web vsftpd]# grep -v ^# vsftpd.conf
anonymous_enable=YES
local_enable=yes
local_root=/data/kefu2
chroot_local_user=YES
allow_writeable_chroot=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=NO
listen_ipv6=YESpam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
[root@web vsftpd]# systemctl restart vsftpd
[root@web vsftpd]# vim vsftpd.conf
您在 /var/spool/mail/root 中有邮件
[root@web vsftpd]# grep -v ^# vsftpd.conf
anonymous_enable=NO
local_enable=yes
local_root=/data/kefu2
chroot_local_user=YES
allow_writeable_chroot=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=NO
listen_ipv6=YESpam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
[root@web vsftpd]# vim vsftpd.conf
您在 /var/spool/mail/root 中有邮件
[root@web vsftpd]# grep -v ^# vsftpd.conf
anonymous_enable=yes
local_enable=no
local_root=/data/kefu2
chroot_local_user=YES
allow_writeable_chroot=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=NO
listen_ipv6=YESpam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
[root@web vsftpd]# systemctl restart vsftpd
您在 /var/spool/mail/root 中有邮件
[root@web vsftpd]# vim vsftpd.conf
您在 /var/spool/mail/root 中有邮件
[root@web vsftpd]# grep -v ^# vsftpd.conf
anonymous_enable=no
local_enable=yes
local_root=/data/kefu2
chroot_local_user=YES
allow_writeable_chroot=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=NO
listen_ipv6=YESpam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
[root@web vsftpd]#
Network error: Software caused connection abort──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────Session stopped- Press <return> to exit tab- Press R to restart session- Press S to save terminal output to file
root@192.168.235.20's password:┌────────────────────────────────────────────────────────────────────┐│                        • MobaXterm 20.0 •                          ││            (SSH client, X-server and networking tools)             ││                                                                    ││ ➤ SSH session to root@192.168.235.20                               ││   • SSH compression : ✘                                            ││   • SSH-browser     : ✔                                            ││   • X11-forwarding  :(remote display is forwarded through SSH) ││   • DISPLAY         :(automatically set on remote server)      ││                                                                    ││ ➤ For more info, ctrl+click on help or visit our website           │└────────────────────────────────────────────────────────────────────┘Last login: Mon Jun 23 19:05:49 2025 from 192.168.235.1
[root@web ~]# hostname
web.cn
[root@web ~]# cd /var/www/html
您在 /var/spool/mail/root 中有新邮件
[root@web html]# ls
index.html  media
[root@web html]# cat index.html
<<video width="800" height="450" controls>
<source src="media/share.mp4">
</video>
[root@web html]# systemctl status httpd
● httpd.service - The Apache HTTP ServerLoaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)Active: active (running) since 三 2025-06-18 20:00:51 CST; 5 days agoDocs: man:httpd(8)man:apachectl(8)Main PID: 13043 (httpd)Status: "Total requests: 18; Current requests/sec: 0; Current traffic:   0 B/sec"Tasks: 8CGroup: /system.slice/httpd.service├─13043 /usr/sbin/httpd -DFOREGROUND├─13051 /usr/sbin/httpd -DFOREGROUND├─13052 /usr/sbin/httpd -DFOREGROUND├─13053 /usr/sbin/httpd -DFOREGROUND├─13054 /usr/sbin/httpd -DFOREGROUND├─13055 /usr/sbin/httpd -DFOREGROUND├─22622 /usr/sbin/httpd -DFOREGROUND└─24220 /usr/sbin/httpd -DFOREGROUND618 20:00:50 web.cn systemd[1]: Starting The Apache HTTP Server...
618 20:00:51 web.cn systemd[1]: Started The Apache HTTP Server.
您在 /var/spool/mail/root 中有邮件
[root@web html]# df -h
文件系统                 容量  已用  可用 已用% 挂载点
devtmpfs                 470M     0  470M    0% /dev
tmpfs                    487M     0  487M    0% /dev/shm
tmpfs                    487M   21M  466M    5% /run
tmpfs                    487M     0  487M    0% /sys/fs/cgroup
/dev/mapper/centos-root   17G  4.9G   13G   29% /
/dev/sda1               1014M  172M  843M   17% /boot
tmpfs                     98M   12K   98M    1% /run/user/42
/dev/sr0                 4.4G  4.4G     0  100% /mnt
192.168.235.100:/share    17G  5.7G   12G   33% /var/www/html/media
tmpfs                     98M     0   98M    0% /run/user/0
您在 /var/spool/mail/root 中有邮件
[root@web html]# mount -t nfs nfsip:/share/ /var/www/html/media
mount.nfs: Failed to resolve server nfsip: Name or service not known
mount.nfs: Operation already in progress
[root@web html]#

192.168.235.100

root@192.168.235.100's password:
Remote side unexpectedly closed network connection──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────Session stopped- Press <return> to exit tab- Press R to restart session- Press S to save terminal output to file
root@192.168.235.100's password:┌────────────────────────────────────────────────────────────────────┐│                        • MobaXterm 20.0 •                          ││            (SSH client, X-server and networking tools)             ││                                                                    ││ ➤ SSH session to root@192.168.235.100                              ││   • SSH compression : ✘                                            ││   • SSH-browser     : ✔                                            ││   • X11-forwarding  :(remote display is forwarded through SSH) ││   • DISPLAY         :(automatically set on remote server)      ││                                                                    ││ ➤ For more info, ctrl+click on help or visit our website           │└────────────────────────────────────────────────────────────────────┘Last login: Thu Jun 19 20:05:14 2025 from 192.168.235.1
[root@nfs ~]# ftp 192.168.235.20
Connected to 192.168.235.20 (192.168.235.20).
220 (vsFTPd 3.0.2)
Name (192.168.235.20:root): jerry
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (192,168,235,20,109,66).
150 Here comes the directory listing.
-rw-rwxr--    1 1023     1023            0 Jun 07 12:46 6
-rw-r--r--    1 1023     1023         1862 Jan 28 03:32 AutoMathSetting.dat
-rw-r--r--    1 1023     1023        16846 Sep 05  2024 ControlMappings.xml
-rw-r--r--    1 1023     1023           81 Mar 25  2024 GameData.dat
-rw-r--r--    1 1023     1023        52065 Jun 17  2024 复仇女神2.png
226 Directory send OK.
ftp> cd /
250 Directory successfully changed.
ftp> ls
227 Entering Passive Mode (192,168,235,20,122,146).
150 Here comes the directory listing.
-rw-rwxr--    1 1023     1023            0 Jun 07 12:46 6
-rw-r--r--    1 1023     1023         1862 Jan 28 03:32 AutoMathSetting.dat
-rw-r--r--    1 1023     1023        16846 Sep 05  2024 ControlMappings.xml
-rw-r--r--    1 1023     1023           81 Mar 25  2024 GameData.dat
-rw-r--r--    1 1023     1023        52065 Jun 17  2024 复仇女神2.png
226 Directory send OK.
ftp> cd /
250 Directory successfully changed.
ftp>
ftp> ls
227 Entering Passive Mode (192,168,235,20,71,225).
150 Here comes the directory listing.
-rw-rwxr--    1 1023     1023            0 Jun 07 12:46 6
-rw-r--r--    1 1023     1023         1862 Jan 28 03:32 AutoMathSetting.dat
-rw-r--r--    1 1023     1023        16846 Sep 05  2024 ControlMappings.xml
-rw-r--r--    1 1023     1023           81 Mar 25  2024 GameData.dat
-rw-r--r--    1 1023     1023        52065 Jun 17  2024 复仇女神2.png
226 Directory send OK.
ftp> bye
221 Goodbye.
[root@nfs ~]# ftp 192.168.235.20
Connected to 192.168.235.20 (192.168.235.20).
220 (vsFTPd 3.0.2)
Name (192.168.235.20:root): ftp
331 Please specify the password.
Password:
530 Login incorrect.
Login failed.
ftp> bye
221 Goodbye.
[root@nfs ~]# ftp 192.168.235.20
Connected to 192.168.235.20 (192.168.235.20).
220 (vsFTPd 3.0.2)
Name (192.168.235.20:root): anonymous
331 Please specify the password.
Password:
530 Login incorrect.
Login failed.
ftp> bye
[root@nfs ~]# ftp 192.168.235.20
Connected to 192.168.235.20 (192.168.235.20).
500 OOPS: vsftpd: both local and anonymous access disabled!
ftp> bye
[root@nfs ~]# ftp 192.168.235.20
Connected to 192.168.235.20 (192.168.235.20).
220 (vsFTPd 3.0.2)
Name (192.168.235.20:root): jerry
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> BYE
?Invalid command
ftp> bye
221 Goodbye.
[root@nfs ~]# ftp 192.168.235.20
Connected to 192.168.235.20 (192.168.235.20).
220 (vsFTPd 3.0.2)
Name (192.168.235.20:root): jerry
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> bye
221 Goodbye.
[root@nfs ~]# ftp 192.168.235.20
Connected to 192.168.235.20 (192.168.235.20).
220 (vsFTPd 3.0.2)
Name (192.168.235.20:root): ftp
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (192,168,235,20,117,99).
150 Here comes the directory listing.
drwxr-xr-x    2 0        0               6 Oct 13  2020 pub
226 Directory send OK.
ftp> cd /
250 Directory successfully changed.
ftp> ls
227 Entering Passive Mode (192,168,235,20,36,136).
150 Here comes the directory listing.
drwxr-xr-x    2 0        0               6 Oct 13  2020 pub
226 Directory send OK.
ftp> bye
421 Timeout.
[root@nfs ~]# ftp 192.168.235.20
Connected to 192.168.235.20 (192.168.235.20).
220 (vsFTPd 3.0.2)
Name (192.168.235.20:root): ftp
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (192,168,235,20,56,11).
150 Here comes the directory listing.
drwxr-xr-x    2 0        0               6 Oct 13  2020 pub
226 Directory send OK.
ftp> cd /
250 Directory successfully changed.
ftp> ls
227 Entering Passive Mode (192,168,235,20,175,97).
150 Here comes the directory listing.
drwxr-xr-x    2 0        0               6 Oct 13  2020 pub
226 Directory send OK.
ftp> bye
221 Goodbye.
[root@nfs ~]# ftp 192.168.235.20
Connected to 192.168.235.20 (192.168.235.20).
220 (vsFTPd 3.0.2)
Name (192.168.235.20:root): jerry
530 This FTP server is anonymous only.
Login failed.
ftp> bye
221 Goodbye.
[root@nfs ~]# ftp 192.168.235.20
Connected to 192.168.235.20 (192.168.235.20).
220 (vsFTPd 3.0.2)
Name (192.168.235.20:root): anonymous
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (192,168,235,20,167,2).
150 Here comes the directory listing.
drwxr-xr-x    2 0        0               6 Oct 13  2020 pub
226 Directory send OK.
ftp> cd /
250 Directory successfully changed.
ftp> sl
?Invalid command
ftp> ls
227 Entering Passive Mode (192,168,235,20,255,140).
150 Here comes the directory listing.
drwxr-xr-x    2 0        0               6 Oct 13  2020 pub
226 Directory send OK.
ftp>
Network error: Software caused connection abort──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────Session stopped- Press <return> to exit tab- Press R to restart session- Press S to save terminal output to file
root@192.168.235.100's password:┌────────────────────────────────────────────────────────────────────┐│                        • MobaXterm 20.0 •                          ││            (SSH client, X-server and networking tools)             ││                                                                    ││ ➤ SSH session to root@192.168.235.100                              ││   • SSH compression : ✘                                            ││   • SSH-browser     : ✔                                            ││   • X11-forwarding  : ✔  (remote display is forwarded through SSH) ││   • DISPLAY         : ✔  (automatically set on remote server)      ││                                                                    ││ ➤ For more info, ctrl+click on help or visit our website           │└────────────────────────────────────────────────────────────────────┘Last login: Mon Jun 23 19:33:09 2025 from 192.168.235.1
[root@nfs ~]# hostname
nfs.cn
[root@nfs ~]# cat /etc/exports
/share   192.168.235.0/24(rw,sync)
[root@nfs ~]# systemctl status nfs-utils
● nfs-utils.service - NFS server and client servicesLoaded: loaded (/usr/lib/systemd/system/nfs-utils.service; static; vendor preset: disabled)Active: inactive (dead)
您在 /var/spool/mail/root 中有新邮件
[root@nfs ~]# systemctl status rpcbind
● rpcbind.service - RPC bind serviceLoaded: loaded (/usr/lib/systemd/system/rpcbind.service; enabled; vendor preset: enabled)Active: active (running) since 三 2025-06-18 19:18:08 CST; 5 days agoProcess: 714 ExecStart=/sbin/rpcbind -w $RPCBIND_ARGS (code=exited, status=0/SUCCESS)Main PID: 723 (rpcbind)CGroup: /system.slice/rpcbind.service└─723 /sbin/rpcbind -w6月 18 19:18:07 nfs.cn systemd[1]: Starting RPC bind service...
6月 18 19:18:08 nfs.cn systemd[1]: Started RPC bind service.
[root@nfs ~]# systemctl status nfs
● nfs-server.service - NFS server and servicesLoaded: loaded (/usr/lib/systemd/system/nfs-server.service; disabled; vendor preset: disabled)Active: active (exited) since 三 2025-06-18 19:35:12 CST; 5 days agoProcess: 5411 ExecStartPost=/bin/sh -c if systemctl -q is-active gssproxy; then systemctl reload gssproxy ; fi (code=exited, status=0/SUCCESS)Process: 5394 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)Process: 5393 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)Main PID: 5394 (code=exited, status=0/SUCCESS)CGroup: /system.slice/nfs-server.service6月 18 19:35:12 nfs.cn systemd[1]: Starting NFS server and services...
6月 18 19:35:12 nfs.cn exportfs[5393]: exportfs: No options for /share 192.168.235.0/24: suggest 192.168.235.0/24(sync) to avoid warning
6月 18 19:35:12 nfs.cn systemd[1]: Started NFS server and services.
Hint: Some lines were ellipsized, use -l to show in full.
[root@nfs ~]# cd /
[root@nfs /]# ls
35.txt  aa3   boot  etc          file20.java  file23.java  file4.java  file7.java          lib    mnt        opt   rsync.sh  share  tmp
aa1     app1  data  file19.java  file21.java  file2.java   file5.java  home                lib64  nohup.out  proc  run       srv    usr
aa2     bin   dev   file1.java   file22.java  file3.java   file6.java  inotify-tools-3.13  media  ok         root  sbin      sys    var
[root@nfs /]# cat rsync.sh
/usr/local/bin/inotifywait -mrq -e create,delete,modify,move,attrib /share |while read events
do
rsync -a --delete /share/ 192.168.235.200:/backup/
echo "$(date '+%F %T')出现事件$events">>/var/log/rsync.log 2>&1
done
[root@nfs /]# ll rsync.sh
-rwxr-xr-x. 1 root root 221 619 21:45 rsync.sh
[root@nfs /]# jobs
[root@nfs /]#

192.168.235.200

caozx26@192.168.235.200's password:
▒▒▒ʱ▒▒ܾ▒
caozx26@192.168.235.200's password:┌────────────────────────────────────────────────────────────────────┐│                        • MobaXterm 20.0 •                          ││            (SSH client, X-server and networking tools)             ││                                                                    ││ ➤ SSH session to caozx26@192.168.235.200                           ││   • SSH compression : ✘                                            ││   • SSH-browser     : ✔                                            ││   • X11-forwarding  :(remote display is forwarded through SSH) ││   • DISPLAY         :(automatically set on remote server)      ││                                                                    ││ ➤ For more info, ctrl+click on help or visit our website           │└────────────────────────────────────────────────────────────────────┘Last failed login: Mon Jun 23 19:33:32 CST 2025 from 192.168.235.1 on ssh:notty
There was 1 failed login attempt since the last successful login.
Last login: Thu Jun 19 20:05:07 2025 from 192.168.235.1
[caozx26@backup ~]$
Network error: Software caused connection abort──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────Session stopped- Press <return> to exit tab- Press R to restart session- Press S to save terminal output to file
caozx26@192.168.235.200's password:┌────────────────────────────────────────────────────────────────────┐│                        • MobaXterm 20.0 •                          ││            (SSH client, X-server and networking tools)             ││                                                                    ││ ➤ SSH session to caozx26@192.168.235.200                           ││   • SSH compression : ✘                                            ││   • SSH-browser     : ✔                                            ││   • X11-forwarding  :(remote display is forwarded through SSH) ││   • DISPLAY         :(automatically set on remote server)      ││                                                                    ││ ➤ For more info, ctrl+click on help or visit our website           │└────────────────────────────────────────────────────────────────────┘Last login: Mon Jun 23 19:33:37 2025 from 192.168.235.1
[caozx26@backup ~]$ hostname
backup.cn
[caozx26@backup ~]$

相关文章:

  • visual studio怎么做网页杭州企业seo
  • 怎么做国外的网站推广正规推广平台有哪些
  • 在深圳做网站平台需要什么备案/杭州优化建筑设计
  • 网站可以自己做/扫描图片找原图
  • 如何规划网站栏目/培训心得体会范文大全1000字
  • 临沂做网站推广的公司有/网站托管代运营
  • C++面向对象3——C++面向对象的权限、引用与指针
  • H5新增属性
  • logstash读取kafka日志写到oss归档存储180天
  • 2025年CSS最新高频面试题及核心解析
  • 边缘-云协同智能视觉系统:实时计算与云端智能的融合架构
  • Linux系统能ping通ip但无法ping通域名的解决方法
  • LeetCode热题100—— 160. 相交链表
  • [附源码+数据库+毕业论文]基于Spring+MyBatis+MySQL+Maven+Vue实现的校园二手交易平台管理系统,推荐!
  • Threejs实现 3D 看房效果
  • 【kubernetes】--controller(deployment)
  • 洛谷 P10379 [GESP202403 七级] 俄罗斯方块-普及/提高-
  • 使用Vue重新构建应用程序
  • UP COIN:从 Meme 共识走向公链与 RWA 的多元生态引擎
  • 浅析std::atomic<T>::compare_exchange_weak和std::atomic<T>::compare_exchange_strong
  • Docker 与 Containerd 交互机制简单剖析
  • Apache SeaTunnel Spark引擎执行流程源码分析
  • 刀客doc:阿里巴巴集团品牌部划归集团公关管理
  • 数组题解——​轮转数组【LeetCode】
  • [HTML]iframe显示pdf,隐藏左侧分页
  • 线程池 JMM 内存模型