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 ...
随机推荐
- Shiro笔记---授权
1.搭建shiro环境(*) idea2018.2.maven3.5.4.jdk1.8 项目结构: pom.xml: <?xml version="1.0" encoding ...
- API 接口开发规范
整体规范建议采用RESTful 方式来实施. 协议 API与用户的通信协议,总是使用HTTPs协议,确保交互数据的传输安全. 域名 应该尽量将API部署在专用域名之下.https://api.exam ...
- 框架搭建与EF常用基类实现
前两篇简单谈了一些.Net Core的优势以及机构设计的一些思路,这一篇开始,我们将从零开始搭建架构,底层我们将采用EF来访问数据库,所以这篇我们将贴一下EF常用操作的基类. 简单介绍下一些类库将要实 ...
- 使用Typescript重构axios(二十七)——添加请求状态码合法性校验
0. 系列文章 1.使用Typescript重构axios(一)--写在最前面 2.使用Typescript重构axios(二)--项目起手,跑通流程 3.使用Typescript重构axios(三) ...
- python学习之【第十七篇】:Python中的面向对象(类和对象)
1.什么是类和类的对象? 类是一种数据结构,我们可以用它来定义对象,后者把数据值和行为特性融合在一起,类是现实世界的抽象的实体以编程形式出现.实例是这些对象的具体化.类是用来描述一类事物,类的对象指的 ...
- UiPath之基础知识(一)
各位小伙伴,大家好.在10月份小U的微信订阅号做了一个投票,主题是UiPath目前已经掌握的程度. 从投票的结果来看,有一半以上的人还是刚刚起步,为了帮助刚刚起步的小伙伴,准备陆续发布一些基础性的内容 ...
- web常用自动化库——selenium总结
概述 selenium是一个模拟控制浏览器操作的自动化库,它可以做到元素定位,鼠标事件,浏览器事件,js脚本执行等操作 与request不同的是,request是单独请求一个http,而seleniu ...
- 【集合系列】- 深入浅出分析Collection中的List接口
一.List简介 List 的数据结构就是一个序列,存储内容时直接在内存中开辟一块连续的空间,然后将空间地址与索引对应. 以下是List集合简易架构图 由图中的继承关系,可以知道,ArrayList. ...
- 网页版的支付宝授权登录(vue+java)
api接口文档:https://docs.open.alipay.com/289/105656 后台管理系统原本是用账号密码登录的,不过需求要改成支付宝授权, 前端仅仅需要改登录页,以及添加一个授权返 ...
- Mirantis 收购 Docker | 云原生生态周报 Vol. 28
作者 | 禅鸣.进超.心水.心贵 业界要闻 Docker 将 Docker Enterprise 卖给 Mirantis Mirantis 是一家扎根于 OpenStack 的云公司,最近专注于 Ku ...