Centos7搭建FTP服務

2021-09-13 10:18:08 字數 1166 閱讀 6254

yum -y install vsftpd

yum install ftp -y

vi /etc/vsftpd/vsftpd.conf

// 部分介紹

anonymous_enable=yes // 允許匿名使用者登入

anon_upload_enable=yes // 允許匿名使用者上傳

write_enable=yes //賦予寫許可權

anon_mkdir_write_enable=yes // 允許匿名使用者新建資料夾

anon_other_write_enable=yes // 匿名使用者擁有除了上傳和新建目錄之外的其他許可權

anon_max_rate=102400 // //最大上傳速度100kbit/s

local_umask=022 //匿名使用者的許可權掩碼

systemctl start vsftpd.service

systemctl enable vsftpd.service開啟服務

systemctl status vsftpd.service檢視狀態

systemctl restart vsftpd.service重啟服務

建立test資料夾

mkdir test

指定檔案許可權

chmod 777 /var/ftp/pub

chmod 777 /test

新增使用者命令

/usr/sbin/adduser -d /test -g ftp -s /sbin/nologin ftpuser

上面的命令是新增乙個 名稱為 ftpuser的使用者。

命令解析:使用命令(adduser)新增ftpuser使用者,不能登入系統(-s /sbin/nologin),自己的資料夾在(/test)),屬於組ftp(-g ftp).

有使用者了,然後為該使用者設定密碼

passwd ftpuser

linux檢視當前系統有幾個賬戶

vi /etc/passwd

CentOS7搭建FTP服務

centos部署ftp yum install y vsftpd vi etc vsftpd vsftpd.conf anonymous enable no data connection timeout 300 chroot local user no allow writeable chroot...

centos7搭建ftp服務

vsftpd是linux下的一款小巧輕快,安全易用的ftp伺服器軟體,是一款在各個linux發行版中最受推崇的ftp伺服器軟體。yum y install vsftpduseradd ftpuserpasswd ftpuser因為ftp預設的埠為21,而centos預設是沒有開啟的,所以要修改ipt...

centOS7 搭建FTP服務

在開始之前先開啟伺服器20 21埠,關閉selinux,然後重啟伺服器 加20 21埠 firewall cmd permanent add port 20 tcp firewall cmd permanent add port 21 tcp 重啟防火牆 firewall cmd reload 檢視...