ubuntu ftp 500 OOPS:prctl PR_SET_SECCOMP失败

我刚刚在我的Ubuntu 14服务器上安装了vsftp。 我已经使用sudo apt-get install命令安装了vsftp。 然后重新启动FTP服务器,但它拒绝所有连接这个错误500 OOPS: prctl PR_SET_SECCOMP failed请看看这里。

 aysael@srv:~$ sudo ftp ftp> open 127.0.0.1 Connected to 127.0.0.1. 500 OOPS: prctl PR_SET_SECCOMP failed 

这是我的configuration文件/etc/vsftpd.conf

 seccomp_sandbox=no listen=YES # Allow anonymous FTP? (Disabled by default) 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 # dirmessage_enable=YES # # If enabled, vsftpd will display directory listings with the time # in your local time zone. The default is to display GMT. The # times returned by the MDTM FTP command are also affected by this # option. use_localtime=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 ftpd_banner=Welcome to blah FTP service. secure_chroot_dir=/var/run/vsftpd/empty # # This string is the name of the PAM service vsftpd will use. pam_service_name=vsftpd # # This option specifies the location of the RSA certificate to use for SSL # encrypted connections. rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem # This option specifies the location of the RSA key to use for SSL # encrypted connections. rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key 

该消息指示prctl(PR_SET_SECCOMP, ...)调用失败。

 if (!tunable_seccomp_sandbox) { return; } ... ret = prctl(PR_SET_SECCOMP, 2, &prog, 0, 0); if (ret != 0) { die("prctl PR_SET_SECCOMP failed"); } 

当内核没有启用CONFIG_SECCOMP_FILTER时,可能会发生这种情况。

prctl手册页引用:

PR_SET_SECCOMP (自Linux 2.6.23开始)

为调用线程设置安全计算(seccomp)模式,以限制可用的系统调用。 seccomp模式通过arg2select。 (seccomp常量在<linux/seccomp.h>中定义

arg2设置为SECCOMP_MODE_FILTER (自Linux 3.5以来),允许的系统调用由一个指向arg3中传递的Berkeley数据包filter的指针定义。 这个参数是一个指向struct sock_fprog的指针; 它可以被devise为过滤任意的系统调用和系统调用参数。 只有在内核configuration了CONFIG_SECCOMP_FILTER下,该模式才可用。


您应该能够通过configurationvsftpd不启用seccomp模式来解决这个问题。

vsftpd.conf使用seccomp_sandbox=no选项。

该选项似乎没有logging。

但是你似乎已经有了这个设定。 这可能表明你的vsftpd.conf没有被实际使用。 或者你没有重新启动vsftpd,因为你设置了这个选项。

如果你真的设置了这个选项,你不应该得到错误信息,你可以在上面的代码片段中看到(你的vsftpd 3.0.2的代码)。