导航:首页 > 操作系统 > linuxftp修改端口

linuxftp修改端口

发布时间:2024-10-22 02:28:16

A. linux下ftp客户端为啥要把端口21改成2121

因为ftp服务器的端口改成了2121,所以客户端也要改成2121。不然连不上。

B. 用wdcp linux服务器管理系统,ftp一直连接不上去,怎么办

从wdcp2.3开始,可以在后台直接修改FTP的默认21端口了,简单方便修改默认21端口,可以为了更安全,防止别人的攻击和扫描。
找到修改FTP端口设置,填入修改后的端口号,点击确认。

C. linux ftp端口怎么设置

1、先查看下有没安装FTP软件rpm -qa vsftpd。

注意事项:

FTP 的目标是提高文件的共享性,提供非直接使用远程计算机,使存储介质对用户透明和可靠高效地传送数据。它能操作任何类型的文件而不需要进一步处理,就像MIME或Unicode一样。

D. linux ftp端口怎么设置

# 匿名用户配置
anonymous_enable=YES # 是否允许匿名ftp,如否则选择NO
anon_upload_enable=YES # 匿名用户是否能上传
anon_mkdir_write_enable=YES # 匿名用户是否能创建目录
anon_other_write_enable=YES # 修改文件名和删除文件

# 本地用户配置
local_enable=YES # 是否允许本地用户登录
local_umask=022 # umask 默认755
write_enable=YES
chroot_local_user=YES # 本地用户禁锢在宿主目录中

chroot_list_enable=YES # 是否将系统用户限止在自己的home目录下
chroot_list_file=/etc/vsftpd.chroot_list # 列出的是不chroot的用户的列表

chown_upload=YES # 是否简态改变上传文件的属主
chown_username=username # 如果是需要输入一个系统用户名

userlist_enable=YES
userlist_deny=NO

deny_email_enable=YES # 是否允许禁止匿名用户使用某些邮件地址
banned_email_file=/etc/vsftpd.banned_emails # 禁止邮件地址的文件路径

ftpd_banner=Welcome to chenlf FTP service. # 定制欢迎信息
dirmessage_enable=YES # 是否显示目录说明文件, 需要收工创建.message文件
message_file= # 设置访问一个目录时获得的目录信孝禅息文件的文件名,默认是.message

xferlog_enable=YES # 是否记录ftp传输过程
xferlog_file=/var/log/vsftpd.log # ftp传输日志的路径和名字
xferlog_std_format=YES # 是否使用标准的ftp xferlog模拦慎源式

ascii_upload_enable=YES # 是否使用ascii码方式上传文件
ascii_download_enable=YES # 是否使用ascii码方式下载文件

connect_from_port_20=YES # 是否确信端口传输来自20(ftp-data)

nopriv_user=ftpsecure # 运行vsftpd需要的非特权系统用户默认是nobody

async_abor_enable=YES # 是否允许运行特殊的ftp命令async ABOR.

# FTP服务器的资源限制

idle_session_timeout=600 # 设置session超时时间
data_connection_timeout=120 # 设置数据传输超时时间

max_clients=50 # 用户最大连接数 默认是0不限止
max_per_ip=5 # 每个IP地址最大连接数

anon_max_rate=102400 # 匿名的下载速度 KB
local_max_rate=102400 # 普通用户的下载速度 KB

E. LinuxFTP上传文件报错解决方法linuxftp无法上传

Linux FTP上传文件报错解决方法
FTP(File Transfer Protocol)是 Internet 上最常用的文件传输协议,可以实现远程文件传输,在Linux系统中也常用于文件上传和下载,但在操作过程中也可能会遇到一些问题,比如FTP上传文件报错的情况。传统的FTP的上传文件报错的错误一般常见的是“425Can’t open data connection”,本文就来介绍Linux下FTP报错的一些解决方法。
#### 1. 检查服务器和客户端FTP配置
在使用FTP传输文件之前,首先需要检查生产环境和开发机是否已经正确配置,以确保系统可以正常工作:
1)检查客户端配置信息:
vi /etc/vsftpd/vsftpd.conf
pasv_enable=YES // 打开配置网路传输
pasv_min_port=30000 // 设定网路传输最小端口
pasv_max_port=60000 // 设定网路传输最大端口
pasv_address= {IP address of the ftp server} // 设定外部的公网IP
2)检查服务器配置信息:
vi /etc/sysconfig/iptables
-A INPUT -p tcp -m state –state NEW -m tcp –dport 30000:60000 -j ACCEPT // 允许FTP服务器客户端的端口通信
service iptables save //保存配置
完成这些配置后,重启服务器生效。
#### 2. 检查端口是否开放
对于端口不开放的情况,Linux也可以使用Iptables或者其他工具来检查。
如果使用Iptables, 可执行以下命令开放端口:
// 允许公网访问该端口,使用-A参数
iptables -A INPUT -p TCP -dport 30000:60000 -j ACCEPT

并执行`service iptables save`来使配置生效,然后重启FTP服务。
#### 3. 确认本地IP是否正确
当FTP服务器端口正确开放,客户端配置也正确时,我们还需要确认本地IP是否正确。如果报错中出现服务端IP或端口有问题,可以检查客户端配置文件中的`pasv_address`配置是否填写正确,这里填写的IP地址应该是外部的公网IP,而不是内部环境下的私有IP。
#### 4. 尝试使用Samba服务
如果FTP服务器或客户端已经配置正确,但仍然不能正常上传文件,可以尝试使用Samba服务,它可以支持Linux服务器的共享文件夹打开,可以将文件简单地传输到Linux服务器。
使用Samba服务时,相比与FTP,它更提供了一种更简洁的方法:
yum -y install samba // 安装samba服务
vi /etc/samba/smb.conf // 可以在这里添加共享文件夹
service smb start // 启动启动服务
经过这些操作,就可以从其他客户端通过Samba方法连接到Linux服务器,并上传文件,功能上和FTP近似,但使用也更加简单,可以避免复杂的服务器配置。
综上,使用FTP上传文件报错的解决方法包含检查服务器和客户端FTP配置,检查端口是否开放,确认本地IP是否正确,以及使用Samba服务,妥善掌握这些技巧可以确保FTP传输文件无需添加其他复杂操作。

F. linux如何重新配置FTP文件,我是新手,配置的时候被我弄错了!

那就可以重新生成配置文件,可以用yum源 yum remove vsftp -y 卸载后,重新在安装一下,就可以了
下面是:Linux FTP配置文件说明

一.vsftpd说明:
LINUX下实现FTP服务的软件很多,最常见的有vsftpd,Wu-ftpd和Proftp等.Red Hat Enterprise Linux中默认安装的是vsftpd.
访问FTP服务器时需要经过验证,只有经过了FTP服务器的相关验证,用户才能访问和传输文件.vsftpd提供了3种ftp登录形式:
(1)anonymous(匿名帐号)
使用anonymous是应用广泛的一种FTP服务器.如果用户在FTP服务器上没有帐号,那么用户可以以anonymous为用户名,以自己的电子邮件地址为密码进行登录.当匿名用户登录FTP服务器后,其登录目录为匿名FTP服务器的根目录/var/ftp.为了减轻FTP服务器的负载,一般情况下,应关闭匿名帐号的上传功能.
(2)real(真实帐号)
real也称为本地帐号,就是以真实的用户名和密码进行登录,但前提条件是用户在FTP服务器上拥有自己的帐号.用真实帐号登录后,其登录的目录为用户自己的目录,该目录在系统建立帐号时系统就自动创建.
(3)guest(虚拟帐号)
如果用户在FTP服务器上拥有帐号,但此帐号只能用于文件传输服务,那么该帐号就是guest,guest是真实帐号的一种形式,它们的不同之处在于,geust登录FTP服务器后,不能访问除宿主目录以外的内容.

二.FTP相关配置文件说明
其相关配置文件有/etc/vsftpd/vsftpd.conf, /etc/vsftpd.ftpusers, /etc/vsftpd.user_list,在配置FTP服务器时,主要是修改这些文件中的相关语句.
1.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 //是否允许anonymous登录FTP服务器,默认是允许的.
#
# Uncomment this to allow local users to log in.
local_enable=YES //是否允许本地用户登录FTP服务器,默认是允许
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES //是否允许用户具有在FTP服务器文件中执行写的权限,默认是允许
#
# 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 //设置本地用户的文件生成掩码为022,默认是077
#
# 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.
#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 //是否允许匿名账户在FTP服务器中创建目录
#
# 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 //启用FTP数据端口的连接请求
#
# 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/vsftpd.log //设置日志文件的文件名和存储路径,这是默认的
#
# If you want, you can have your log file in standard ftpd xferlog format
xferlog_std_format=YES//是否使用标准的ftpd xferlog日志文件格式
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600 //设置空闲的用户会话中断时间,默认是10分钟
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120//设置数据连接超时时间,默认是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.
# Beware that turning on ascii_download_enable enables malicious remote parties
# to consume your I/O resources, by issuing the command "SIZE /big/file" in
# ASCII mode.
# These ASCII options are split into upload and download because you may wish
# to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),
# without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be
# on the client anyway..
#ascii_upload_enable=YES
#ascii_download_enable=YES //是否允许使用ASCII格式来上传和下载文件
#
# You may fully customise the login banner string:
#ftpd_banner=Welcome to blah FTP service.//在FTP服务器中设置欢迎登录的信息.
#
# 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().
#chroot_list_enable=YES //如果希望用户登录后不能切换到自己目录以外的其它目录,需要设置该项,如果设置chroot_list_enable=YES,那么只允许/etc/vsftpd.chroot_list中列出的用户具有该功能.如果希望所有的本地用户都执行者chroot,可以增加一行:chroot_local_user=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
pam_service_name=vsftpd //设置PAM认证服务的配置文件名称,该文件存放在/etc/pam.d/目录下.
userlist_enable=YES //用户列表中的用户是否允许登录FTP服务器,默认是不允许
#enable for standalone mode
listen=YES //使vsftpd 处于独立启动模式
tcp_wrappers=YES //使用tcp_wrqppers作为主机访问控制方式
2.vsftpd.ftpusers文件说明
这个文件是用来记录"不允许"登录到FTP服务器的用户,通常是一些系统默认的用户.
下面是该文件中默认的不允许登录的名单:
# Users that are not allowed to login via ftp
root //默认情况下,root和它以下的用户是不允许登录FTP服务器的.可以将不允许登录的用户添加到这里来.但切记每个用户都要单独占用一行.
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody
3.vsftpd.user_list文件说明
其实它的内容跟上面那个文件内容一样,只是在系统对文件vsftpd.conf 进行检测时,会检测到"userlist_deny=YES",因此这个文件必须存在.下面是这个文件的内容.
# vsftpd userlist
# If userlist_deny=NO, only allow users in this file
# If userlist_deny=YES (default), never allow users in this file, and
# do not even prompt for a password.
# Note that the default vsftpd pam config also checks /etc/vsftpd.ftpusers
# for users that are denied.
root
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody

阅读全文

与linuxftp修改端口相关的资料

热点内容
服务器没反应是怎么回事啊 浏览:496
通达信嵌入Python编写公式吗 浏览:210
程序员视频资源 浏览:200
恶意pdf 浏览:615
服务器如何点亮硬盘 浏览:267
用于扫描的文件夹怎么设置 浏览:897
猫团网app邀请人在哪里填 浏览:691
平衡101规约源码 浏览:531
类似淘宝的源码 浏览:31
javaocx控件 浏览:149
php实现文件夹压缩 浏览:38
mysql表修复命令 浏览:705
安卓手机怎么连接gt2 浏览:861
易企秀源码免费下载 浏览:767
115网盘在哪里下载app 浏览:687
python爬虫onclick 浏览:11
apache去掉indexphp 浏览:151
python编写最小值函数 浏览:160
房地产pdf 浏览:665
工行app哪里可以选ar扫码 浏览:529