10

我不知道为什么它无法打开配置文件。

$ ll /etc/vsftpd/vsftpd.conf
-rw-r--r-- 1 xuehui1 root 4182 Aug 20  2012 /etc/vsftpd/vsftpd.conf //exits
$ sudo /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf
500 OOPS: cannot open config file:/etc/vsftpd/vsftpd.conf

这是 vsftpd.conf,它在其他 linux 机器(centos)上运行良好,但这个?任何帮助将不胜感激。

# Example config file /etc/vsftpd/vsftpd.conf
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# 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
# 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
#
# If you want, you can have your log file in standard ftpd xferlog format
xferlog_std_format=YES
#
chroot_local_user=YES
pam_service_name=vsftpd
userlist_enable=YES
#enable for standalone mode
listen=YES
tcp_wrappers=YES
use_localtime=YES
4

9 回答 9

10

这是关于文件所有者的问题。你应该为配置设置正确的所有者/etc/vsftpd/vsftpd.conf

sudo chown root /etc/vsftpd/vsftpd.conf
于 2014-02-10T11:24:40.513 回答
8

使用service vsftpd [start/restart/stop],而不是简单vsftpd [start/restart/stop]

于 2014-04-14T10:00:48.423 回答
7

根据操作系统,您可能会因为运行不正确的命令而收到以下错误。例如,我在 Linux Mint 15 中运行了以下命令:

sudo vsftpd restart

我收到的输出是:

500 OOPS: cannot read config file: restart

重新启动 vsftpd 守护进程的正确命令是:

sudo restart vsftpd 

这给出了输出:

vsftpd start/running, process 2231
于 2014-11-09T00:16:23.720 回答
2

我的解决方案是使用 systemctl 命令启动 vsftpd。

sudo systemctl start vsftpd
于 2016-05-10T11:28:33.473 回答
1

由于 xinetd ftp 正在运行,您可能会收到此错误。

下面提到的过程将解决以下错误:

  • vsftpd 错误:500 OOPS:无法绑定侦听 IPv4 套接字
  • ncftpget 错误:连接后服务器立即挂断

请按照以下步骤纠正错误:

  1. 要查看正在运行的 ftp 服务,请使用

    • $ lsof -i | grep ftp
  2. 停止 xinetd :

    • $ sudo 服务 xinetd 停止
  3. 停止 xinetd 后,键入以下命令重新启动 vsftpd 服务:

    • $ /etc/init.d/vsftpd restart (成为root并运行此命令)
  4. 还要用这个检查 vsftpd.conf

    • 听=是

    • local_enable=YES

    • write_enable=YES

    • local_umask=022

    • dirmessage_enable=YES

    • use_localtime=YES

    • xferlog_enable=YES

    • secure_chroot_dir=/var/run/vsftpd/empty

    • pam_service_name=vsftpd

    • rsa_cert_file=/etc/ssl/private/vsftpd.pem

于 2015-12-28T13:55:01.073 回答
0

这对我有用

sudo restart vsftpd
于 2015-04-03T13:21:28.000 回答
0

这对我有用:

sudo systemctl restart vsftpd.service
于 2019-07-01T16:29:18.300 回答
0

在 macOS 上,新安装的 vsftpd 进程失败并显示该消息。我必须告诉它我的配置文件在哪里:

$ sudo vsftpd/3.0.3/sbin/vsftpd /etc/vsftpd.conf & [1] 5735

于 2017-03-25T21:30:24.167 回答
-1

我做了这个

sudo dpkg-reconfigure vsftpd
于 2015-12-10T05:14:18.530 回答