centos7 配置 vsftpd 失败!
我想大声告诉你
我想大声告诉你 2017-04-25 09:01:38
0
3
1242

需求

1)让用户可以使用FTP软件登录到网站,进行上传下载
2)但是他只能看到网站下的,不能超出网站目录!

安装

用的是vsftpd

yum install vsftpd
systemctl start vsftpd
systemctl enable vsftpd

问题

按照网上说的 https://www.liberiangeek.net/2014/08/install-vsftpd-ftp-server-centos-7/ 配置vsftpd,修改了/etc/vsftpd/vsftpd.conf 重启结果一直报错:

[root@niche vsftpd]# systemctl restart vsftpd
Job for vsftpd.service failed. See 'systemctl status vsftpd.service' and 'journa                
lctl -xn' for details.
[root@niche vsftpd]# systemctl restart vsftpd.service
Job for vsftpd.service failed. See 'systemctl status vsftpd.service' and 'journa                
lctl -xn' for details.
[root@niche vsftpd]# systemctl status vsftpd.service
vsftpd.service - Vsftpd ftp daemon
   Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; disabled)
   Active: failed (Result: exit-code) since Tue 2014-12-16 16:32:09 UTC; 15s ago
  Process: 13586 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited                
, status=1/FAILURE)

Dec 16 16:32:09 niche systemd[1]: vsftpd.service: control process exited, c...=1
Dec 16 16:32:09 niche systemd[1]: Failed to start Vsftpd ftp daemon.
Dec 16 16:32:09 niche systemd[1]: Unit vsftpd.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
[root@niche vsftpd]# systemctl start vsftpd
Job for vsftpd.service failed. See 'systemctl status vsftpd.service' and 'journalctl -xn' for de
[root@niche vsftpd]# journalctl -xn
-- Logs begin at Tue 2014-12-16 06:28:59 UTC, end at Tue 2014-12-16 16:33:26 UTC. --
Dec 16 16:31:49 niche systemd[1]: Failed to start Vsftpd ftp daemon.
-- Subject: Unit vsftpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit vsftpd.service has failed.
--
-- The result is failed.
Dec 16 16:31:49 niche systemd[1]: Unit vsftpd.service entered failed state.
Dec 16 16:32:06 niche systemd[1]: Starting Vsftpd ftp daemon...
-- Subject: Unit vsftpd.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit vsftpd.service has begun starting up.
Dec 16 16:32:09 niche systemd[1]: vsftpd.service: control process exited, code=exited status=1
Dec 16 16:32:09 niche systemd[1]: Failed to start Vsftpd ftp daemon.
-- Subject: Unit vsftpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit vsftpd.service has failed.
--
-- The result is failed.
Dec 16 16:32:09 niche systemd[1]: Unit vsftpd.service entered failed state.
Dec 16 16:33:23 niche systemd[1]: Starting Vsftpd ftp daemon...
-- Subject: Unit vsftpd.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit vsftpd.service has begun starting up.
Dec 16 16:33:26 niche systemd[1]: vsftpd.service: control process exited, code=e
Dec 16 16:33:26 niche systemd[1]: Failed to start Vsftpd ftp daemon.
-- Subject: Unit vsftpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit vsftpd.service has failed.
--
-- The result is failed.
Dec 16 16:33:26 niche systemd[1]: Unit vsftpd.service entered failed state.
lines 6-42/42 (END)
--
-- Unit vsftpd.service has failed.
--
-- The result is failed.
Dec 16 16:31:49 niche systemd[1]: Unit vsftpd.service entered failed state.
Dec 16 16:32:06 niche systemd[1]: Starting Vsftpd ftp daemon...
-- Subject: Unit vsftpd.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit vsftpd.service has begun starting up.
Dec 16 16:32:09 niche systemd[1]: vsftpd.service: control process exited, code=e
Dec 16 16:32:09 niche systemd[1]: Failed to start Vsftpd ftp daemon.
[root@niche vsftpd]#


我想大声告诉你
我想大声告诉你

membalas semua(3)
黄舟

直接用/etc/init.d/vsftpd启动
配置如下:


anon_world_readable_only=TIDAK
anonymous_enable=TIDAK
chroot_local_user=YA
guest_enable=TIDAK
guest_username=ftp
hide_ids=YA
dengar=YA
listen_address=192.168.1.200
local_enable=YA
max_clients=500
max_per_ip=200
nopriv_user=ftp
pam_service_name=ftp
pasv_max_port=65535
pasv_min_port=64000
session_support=TIDAK
use_localtime=YA
user_config_dir=/etc/vsftpd/users
userlist_enable=YA
userlist_file=/etc/vsftpd/denied_users
xferlog_enable=YA
anon_umask=0007
local_umask=0022
async_abor_enable=YA
connect_from_port_20=YA
dirlist_enable=TIDAK
download_enable=TIDAK
reverse_lookup_enable=TIDAK
dual_log_enable=YA
vsftpd_log_file=/var/log/vsftpd.log

黄舟

Kadangkala ia mungkin disebabkan oleh selinux dan akses kepada fail sslkey tidak dibenarkan Jalankan arahan berikut untuk melepaskan sekatan

setsebool -P ftp_home_dir=1   //设置ftp可以使用home目录
setsebool -P allow_ftpd_full_access=1   //设置ftp用户可以有所有权限
阿神

Sebaik-baiknya tunjukkan fail konfigurasi untuk melihat

Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan