重启vsftpd出现”500 OOPS: vsftpd: cannot open config file:restart”

2008-05-09 21:33

进到/etc/init.d/目录

输入: vsftpd restart

得到条错误信息”500 OOPS: vsftpd: cannot open config file:restart”

当时就郁闷了…

然后又试了: vsftpd stop

又得到条错误信息”500 OOPS: vsftpd: cannot open config file:stop”

再来: vsftpd

“500 OOPS: could not bind listening IPv4 socket”

发现原来是来在这里输入vsftpd执行的不是这个目录下的vsftpd,而是/usr/sbin/目录下的vsftpd(因为root的用户目录 是这个…)要执行/etc/init.d/vsftpd 一定要输入完整的路径.不管你在哪个地方,输入而整的路径就可以运行了.例如我现在已经在/etc/init.d/目录下了,但我要执行vsftpd restart,还是要输入: /etc/init.d/vsftpd restart

安装vsftpd 报告错误 undefined reference to `crypt'

gcc -c access.c -lcrypt -O2 -Wall -W -Wshadow  -idirafter dummyinc 
gcc -c features.c -lcrypt -O2 -Wall -W -Wshadow  -idirafter dummyinc 
gcc -c readwrite.c -lcrypt -O2 -Wall -W -Wshadow  -idirafter dummyinc 
gcc -c opts.c -lcrypt -O2 -Wall -W -Wshadow  -idirafter dummyinc 
gcc -c ssl.c -lcrypt -O2 -Wall -W -Wshadow  -idirafter dummyinc 
gcc -c sslslave.c -lcrypt -O2 -Wall -W -Wshadow  -idirafter dummyinc 
gcc -c ptracesandbox.c -lcrypt -O2 -Wall -W -Wshadow  -idirafter dummyinc 
gcc -c ftppolicy.c -lcrypt -O2 -Wall -W -Wshadow  -idirafter dummyinc 
gcc -c sysutil.c -lcrypt -O2 -Wall -W -Wshadow  -idirafter dummyinc 
gcc -c sysdeputil.c -lcrypt -O2 -Wall -W -Wshadow  -idirafter dummyinc 
gcc  -o vsftpd main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o  tunables.o ftpdataio.o secbuf.o ls.o postprivparent.o logging.o str.o  netstr.o sysstr.o strlist.o banner.o filestr.o parseconf.o secutil.o  ascii.o oneprocess.o twoprocess.o privops.o standalone.o hash.o  tcpwrap.o ipaddrparse.o access.o features.o readwrite.o opts.o ssl.o  sslslave.o ptracesandbox.o ftppolicy.o sysutil.o sysdeputil.o -Wl,-s  `./vsf_findlibs.sh` 
sysdeputil.o: In function `vsf_sysdep_check_auth':
sysdeputil.c:(.text+0xf1): undefined reference to `crypt'
sysdeputil.c:(.text+0x122): undefined reference to `crypt'

解决方法:

打开Makefile

vim Makefile

LIBS    =       `./vsf_findlibs.sh`

末尾增加 -lcrypt 变成

LIBS    =       `./vsf_findlibs.sh` -lcrypt

http://stackoverflow.com/questions/12884229/gcc-lcrypt-flag-error-in-unix-c-undefined-reference-to-crypt

Linux VSFTP提示500 OOPS: failed to open xferlog log file:/var/log/xferlog

方法一:

解决方法:
在终端输入命令: 
setsebool ftpd_disable_trans 1 
service vsftpd restart 
回车就可以了。网络太强大。

方法二:

I had the same problem recently, I also got the message:
500 OOPS: failed to open xferlog log file:/var/log/xferlog

This is what I did:

Open a terminal
Switch to root using su -
service vsftpd stop
Wait for the message: Shutting down vsftpd: [ OK ]
After this I removed the log file
rm /var/log/vsftpd.log
Type "y" for the question: rm: remove regular file `/var/log/vsftpd.log'?
service vsftpd start

After I did this everything worked OK.
vsftpd created a new log file in /var/log/ and it logged every upload/download.
I hope this have helped you.

1、首先安装vsftpd,如果未安装,则执行yum -y install vsftpd,这样将会自动在网上down and setup 
  vsftpd。

2、创建ftp 用户组及用户: 
   # groupadd ftpgroup 
   # useradd ftpuser -g ftpgroup -d /ftp -m 
   # passwd ftpuser

输入密码2遍
   /ftp是ftp 用户访问的文件夹

3、在windows中cmd执行ftp IP显现

500 OOPS: vsftpd: cannot locate user specified in 'ftp_username':ftp

的错误消息

需要在vsftpd.conf中加入了ftp_username=ftpuser(用户)这一行,ftp_username的缺省用户应该是ftp

4、修改vi /etc/vsftpd/vsftpd.conf 文件 将下面的注释去掉 
   Anon_upload_enable=yes 
   Anon_mkdir_write_enable=yes 
   Write_enable=yes

5、/etc/init.d/vsftpd restart后成功登陆

如果出现“550 create directory operation failed”

是SELinux安装机制搞的鬼.只要disable SELinux就可以了.

# vi /etc/selinux/config
将 SELINUX=XXX -->XXX 代表级别
改为
SELINUX=disabled
或者setsebool -P ftpd_disable_trans on      或者 setsebool -P  ftp_home_dir  on

如果不能执行,提示“
Could not change active booleans: Invalid boolean

可以执行以下命令
setsebool allow_ftpd_full_access  1
setsebool allow_ftpd_use_cifs 1
setsebool allow_ftpd_use_nfs 1
 setsebool ftp_home_dir  1
setsebool httpd_enable_ftp_server 1
setsebool tftp_anon_write 1

6、 service vsftpd restart

 
 
一般是pam.d下的验证文件问题

1:检查/etc/vsftpd/vsftpd.conf里pam_server_name=vsftpd与/etc/pam.d/vsftpd两个文件名是否相同(这个文件是验证用户名/密码所用的文件,名字可以随便起,但两者要一样,因为vsftpd.conf是调用/etc/pam.d/下的这个文件,要是名称不同,验证无法通过)
2:打开/etc/pam.d/vsftpd如下所示
#%PAM-1.0
session optional pam_keyinit.so force revoke
auth required pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed
........
在#%PAM-1.0这一行下面添加
auth sufficient /lib64/security/pam_userdb.so db=/etc/vsftpd/vuser
account sufficient /lib64/security/pam_userdb.so db=/etc/vsftpd/vuser
这里有三个地方需要注意
1)网上有许多资料将sufficient改写为required,但我的系统如果写为required则无法登录,出现530 login incorrect 2)/lib64/如果你的系统是64位切忌这里是/lib64,网上这里大多写的是/lib那是因为他们是32位系统
3)db=/etc/vsftpd/vuser这个是你用db_load加密后的文件,名字不要搞错
走了很多弯路,总结了vsftpd虚拟用户不能登录的几点原因

安装RedHat 6.4 企业版时,配置vsftpd 时出现

500 OOPS: cannot change directory:

linux打开ftp遇到的问题 500 OOPS: cannot change directory:

google好多都是 执行这个就OK setsebool ftpd_disable_trans 1

service vsftpd restart

但是执行的时候遇到这个问题  Could not change active booleans: Invalid boolean

搜了好久终于解决

setsebool -P ftp_home_dir=1

现象:

ftp: connect: No route to host
 
ftp> ls
227 Entering Passive Mode (1,2,3,4,43,196)
ftp: connect: No route to host
ftp> passive
Passive mode off.

停止ftp服务器上的iptables 则一切正常,于是判断是iptables的问题

FTP错误ftp: connect: No route to host的解决办法

Try "modprobe ip_conntrack_ftp", if that helps. If yes, then you should
add that module to /etc/sysconfig/iptables-config.

In /etc/sysconfig/iptables-config try setting
IPTABLES_MODULES="ip_nat_ftp ip_conntrack_ftp"
and restart iptables.

[root@host335 ~]# service iptables stop
Flushing firewall rules: [  OK  ]
Setting chains to policy ACCEPT: filter [  OK  ]
Unloading iptables modules: [  OK  ]
[root@host335 ~]# service iptables start
Applying iptables firewall rules: [  OK  ]
Loading additional iptables modules: ip_nat_ftp ip_conntrack_ftp [  OK  ]

linux搭建ftp出错汇总的更多相关文章

  1. 使用Linux搭建FTP服务器实现文件共享

    使用Linux搭建FTP服务器实现文件共享... ---------------- Linux中的文件共享:FTPVSFTPDVSFTPD虚拟用户 FTP可以用在Linux与Linux 和Window ...

  2. Linux 搭建FTP

    Linux 搭建FTP 步骤一:安装 vsftpd 1,运行以下命令安装 vsftpd. yum install -y vsftpd 出现下图表示安装成功. 2,打开etc/vsftpd cd /et ...

  3. Linux 搭建FTP服务器

    介绍 本章主要介绍在Linux中搭建FTP服务器的过程,需要掌握的要点是配置文件的合理配置. 知识点 在linux中使用的FTP是vsftp FTP可以有三种登入方式分别是: 匿名登录方式:不需要用户 ...

  4. Linux——搭建FTP服务

    一.FTP基本概念: 1.FTP的作用: 实现文件系统的安全匿名访问:包括上传.下载和查看,可以应用于Windows和Linux系统 2.FTP的工作原理 server与client都支持ftp传输协 ...

  5. Linux搭建FTP服务器

    一.搭建环境 阿里云 CentOS 7.3 64位 二.FTP协议基础知识 2.1 简介 FTP 是 File Transfer Protocol(文件传输协议)的英文简称,而中文简称为"文 ...

  6. linux搭建FTP服务器并整合Nginx

    操作系统:Centos7 1.1.服务器配置 # 关闭SELINUX,把SELINUX=enforcing改为SELINUX=disabled,reboot重启服务器生效 vim /etc/sysco ...

  7. Linux搭建FTP服务器实战

    首先准备一台Linux系统机器(虚拟机也可), 检测出是否安装了vsftpd软件: rpm -qa |grep vsftpd 如果没有输出结果,就是没有安装. 使用命令安装,安装过程中会有提示,直接输 ...

  8. Linux搭建FTP

    Linux FTP 服务器配置简单说明 转载:http://blog.csdn.net/tianlesoftware/article/details/6151317

  9. Linux搭建ftp服务器简单教程及使用方法

    参考文章:https://www.waitig.com/linux-or-centos-install-vsftpd-and-setup-it.html 步骤概括如下: 安装:yum install ...

随机推荐

  1. 【IntelliJ IDEA】Unable to save settings: Failed to save settings. Please restart IntelliJ IDEA 解决办法

    笔者打开IntelliJ IDEA敲代码的时候遇到了如下问题: IDEA Event Log窗口提示 Unable to save settings: Failed to save settings. ...

  2. mysql分组和去重同时使用

    这是我的数据结构: 这是我的统计SQL

  3. [Python]python面向对象 __new__方法及单例设计

    __new__ 方法 使用 类名() 创建对象时,Python 的解释器 首先 会 调用 __new__ 方法为对象 分配空间 __new__ 是一个 由 object 基类提供的 内置的静态方法,主 ...

  4. 清华大学教学内核ucore学习系列(1) bootloader

    ucore是清华大学操作系统课程的实验内核,也是一个开源项目,是不可多得的非常好的操作系统学习资源 https://github.com/chyyuu/ucore_lab.git, 各位同学可以使用g ...

  5. Java自动化测试框架-10 - TestNG之测试结果篇

    1.-测试结果 1.1-成功,失败和断言 测试被认为是成功的,如果它不引发任何异常完成,还是它扔的预期异常(请参阅文档expectedExceptions属性上找到的@Test注释). 您的测试方法通 ...

  6. 可爱精灵宝贝 DP/爆搜

    考崩了 T2 这题是个DP的好题啊(凡是我不会的都是好题,所以所有的题都是好题(雾)) DP思路: 分析性质:这个人对于路上的小精灵,能收集就一定会收集,即他每次都会收集这一段区间的小精灵 然后就考虑 ...

  7. PHP判断是否为手机端的方法

    PHP判断是否为手机端的方法 private function ismobile() { // 如果有HTTP_X_WAP_PROFILE则一定是移动设备 if (isset($_SERVER['HT ...

  8. JAVA 调用HTTP接口POST或GET实现方式

    HTTP是一个客户端和服务器端请求和应答的标准(TCP),客户端是终端用户,服务器端是网站.通过使用Web浏览器.网络爬虫或者其它的工具,客户端发起一个到服务器上指定端口(默认端口为80)的HTTP请 ...

  9. element - ui tree

    一行代码两行泪,没有外网真可怕!好久没写博客了,更新一把. <template> <div> <el-tree :data="data" :props ...

  10. Reporting service个人使用经验

    (此文章是从自己写的Word文档里复制过来的,图没有了,文字也有些乱,凑合看吧) 部署环境 Windows server 2012 R2 软件环境 安装完整的sqlsever2012,IIS服务 需要 ...