linux搭建ftp出错汇总
重启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出错汇总的更多相关文章
- 使用Linux搭建FTP服务器实现文件共享
使用Linux搭建FTP服务器实现文件共享... ---------------- Linux中的文件共享:FTPVSFTPDVSFTPD虚拟用户 FTP可以用在Linux与Linux 和Window ...
- Linux 搭建FTP
Linux 搭建FTP 步骤一:安装 vsftpd 1,运行以下命令安装 vsftpd. yum install -y vsftpd 出现下图表示安装成功. 2,打开etc/vsftpd cd /et ...
- Linux 搭建FTP服务器
介绍 本章主要介绍在Linux中搭建FTP服务器的过程,需要掌握的要点是配置文件的合理配置. 知识点 在linux中使用的FTP是vsftp FTP可以有三种登入方式分别是: 匿名登录方式:不需要用户 ...
- Linux——搭建FTP服务
一.FTP基本概念: 1.FTP的作用: 实现文件系统的安全匿名访问:包括上传.下载和查看,可以应用于Windows和Linux系统 2.FTP的工作原理 server与client都支持ftp传输协 ...
- Linux搭建FTP服务器
一.搭建环境 阿里云 CentOS 7.3 64位 二.FTP协议基础知识 2.1 简介 FTP 是 File Transfer Protocol(文件传输协议)的英文简称,而中文简称为"文 ...
- linux搭建FTP服务器并整合Nginx
操作系统:Centos7 1.1.服务器配置 # 关闭SELINUX,把SELINUX=enforcing改为SELINUX=disabled,reboot重启服务器生效 vim /etc/sysco ...
- Linux搭建FTP服务器实战
首先准备一台Linux系统机器(虚拟机也可), 检测出是否安装了vsftpd软件: rpm -qa |grep vsftpd 如果没有输出结果,就是没有安装. 使用命令安装,安装过程中会有提示,直接输 ...
- Linux搭建FTP
Linux FTP 服务器配置简单说明 转载:http://blog.csdn.net/tianlesoftware/article/details/6151317
- Linux搭建ftp服务器简单教程及使用方法
参考文章:https://www.waitig.com/linux-or-centos-install-vsftpd-and-setup-it.html 步骤概括如下: 安装:yum install ...
随机推荐
- 11 一步一步Zabbix4.4.0系统教你实现sendEmail邮件报警
点击返回:自学Zabbix之路 点击返回:自学Zabbix4.0之路 点击返回:自学zabbix集锦 一步一步Zabbix4.4.0系统教你实现sendEmail邮件报警 sendEmail是一个轻量 ...
- group 状压dp
应某些人要求,我把标签删掉了 这是一道好题. 一看$c<=16$果断状压,但是怎么压? 一个很显然的思路是,枚举上下两层的状态,每一层的状态极限有$C(c,c/2)$,c=16的时候有13000 ...
- KETTLE常见问题和优化
1.创建MySQL空资源库报错问题:因为boolean类型的问题,Mysql中的boolean类型实际上保存为TINYINT,需要手动的修改生成资源库的sql脚本,将其中的插入用户ENABLED的值由 ...
- 如何把链表以k个结点为一组进行翻转
[MT笔试题] 题目描述: K 链表翻转是指把每K个相邻的结点看成一组进行翻转,如果剩余结点不足 K 个,则保持不变.假设给定链表 1 -> 2 -> 3 -> 4 -> 5 ...
- 基于docker搭建Jenkins+Gitlab+Harbor+Rancher架构实现CI/CD操作(续)---Harbor的安装
前期安装文档:https://www.cnblogs.com/lq-93/p/11828626.html Harbor的作用: 开发提交代码至gitlab容器中,Jenkins拉取代码构建镜像 ...
- 2-了解DBMS
1.DB,DBS,DBMS的区别是什么? 1.1 DB 就是数据库,数据库是存储数据的集合,可理解为多个数据表 1.2 DBS 数据库系统,包括数据库,数据库管理系统和数据库管理人员D ...
- 说一说,“NetWork Wall”所用到技术
2010年1月17日,Google在其官方网站上发布了一篇名为<A new approach to China>的博文,在博文中,Google官方透露,将停止过滤搜索结果.在国内市场上停止 ...
- 本地通知-UILocalNotification
第一步:创建本地推送 本地通知 UILocalNotification // 创建⼀一个本地推送 UILocalNotification * notification = [[UILocalNotif ...
- pat 1046 Shortest Distance(20 分) (线段树)
1046 Shortest Distance(20 分) The task is really simple: given N exits on a highway which forms a sim ...
- nyoj 51-管闲事的小明(遍历,比较)
51-管闲事的小明 内存限制:64MB 时间限制:4000ms Special Judge: No accepted:9 submit:20 题目描述: 某校大门外长度为L的马路上有一排树,每两棵相邻 ...