Maison  >  Questions et réponses  >  le corps du texte

centos7 配置 vsftpd 失败!

需求

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]#


我想大声告诉你我想大声告诉你2733 Il y a quelques jours1200

répondre à tous(3)je répondrai

  • 黄舟

    黄舟2017-04-25 09:03:38

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


    anon_world_readable_only=NON
    anonyme_enable=NON
    chroot_local_user=OUI
    guest_enable=NON
    guest_username=ftp
    hide_ids=OUI
    écouter=OUI
    adresse_écoute=192.168.1.200
    local_enable=OUI
    max_clients=500
    max_per_ip=200
    nopriv_user=ftp
    pam_service_name=ftp
    pasv_max_port=65535
    pasv_min_port=64000
    session_support=NON
    use_localtime=OUI
    user_config_dir=/etc/vsftpd/users
    userlist_enable=OUI
    userlist_file=/etc/vsftpd/denied_users
    xferlog_enable=OUI
    anon_umask=0007
    local_umask=0022
    async_abor_enable=OUI
    connect_from_port_20=OUI
    dirlist_enable=NON
    download_enable=NON
    reverse_lookup_enable=NON
    dual_log_enable=OUI
    vsftpd_log_file=/var/log/vsftpd.log

    répondre
    0
  • 黄舟

    黄舟2017-04-25 09:03:38

    Parfois, cela peut être dû à Selinux et l'accès au fichier sslkey n'est pas autorisé. Exécutez la commande suivante pour lever la restriction

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

    répondre
    0
  • 阿神

    阿神2017-04-25 09:03:38

    Il est préférable d'afficher le fichier de configuration pour un aperçu

    répondre
    0
  • Annulerrépondre