導航:首頁 > 操作系統 > 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