vsftp正常登录,无法列出文件目录

iptables里面仅仅开放了80、21等常用端口,这样就导致了vsFTPd在被动模式时无法使用随机端口,从而造成了客户端连接FTP时无法列出目录这样的问题。解决方式很简单,给vsFTPd增加随机端口的范围,然后把这个端口范围添加到iptables。
具体做法如下:
1、修改/etc/vsftpd/vsftpd.conf的配置文件,在文件末端添加:
pasv_max_port=6666
pasv_min_port=5555
/etc/init.d/vsftpd restart
2、添加一条防火墙规则
/etc/init.d/iptables stop
iptables -I INPUT -p tcp –dport 5555:6666 -j ACCEPT
/etc/init.d/iptables save
/etc/init.d/iptables start
最后再次进行ftp连接,成功。

Openwrt编译出错

checking whether mknod can create fifo without rootprivileges… configure: error: in '/home/openwrt/build_dir/host/tar-1.28′:
configure: error: you should not run configure as root(set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)
See 'config.log' for more details

解决方法:

Export FORCE_UNSAFE_CONFIGURE=1

gengetopt编译失败问题

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
make[9]: *** [c_source.lo] Error 1
make[9]: Leaving directory `/home/panyao/work/openwrt/chaos_calmer/build_dir/host/gengetopt-2.22.6/src/skels'
make[8]: *** [all] Error 2
make[8]: Leaving directory `/home/panyao/work/openwrt/chaos_calmer/build_dir/host/gengetopt-2.22.6/src/skels'
make[7]: *** [all-recursive] Error 1
make[7]: Leaving directory `/home/panyao/work/openwrt/chaos_calmer/build_dir/host/gengetopt-2.22.6/src'
make[6]: *** [all] Error 2
make[6]: Leaving directory `/home/panyao/work/openwrt/chaos_calmer/build_dir/host/gengetopt-2.22.6/src'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/home/panyao/work/openwrt/chaos_calmer/build_dir/host/gengetopt-2.22.6'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/home/panyao/work/openwrt/chaos_calmer/build_dir/host/gengetopt-2.22.6'
make[3]: *** [/home/panyao/work/openwrt/chaos_calmer/build_dir/host/gengetopt-2.22.6/.built] Error 2
make[3]: Leaving directory `/home/panyao/work/openwrt/chaos_calmer/tools/gengetopt'
make[2]: *** [tools/gengetopt/compile] Error 2
make[2]: Leaving directory `/home/panyao/work/openwrt/chaos_calmer'
make[1]: *** [/home/panyao/work/openwrt/chaos_calmer/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.tools_install_yynyyynynynyyyyyyyyyyyyyyyyyyynyyyyynnyyynyyynnnyy] Error 2
make[1]: Leaving directory `/home/panyao/work/openwrt/chaos_calmer'
make: *** [world] Error 2

在g++选项中 “ -g -O2”不能同时出现。把-g去掉(我就简单的在build_dir/host/gengetopt-2.22.6/src/skels中的Makefile上面改一下就可以了),之后就可以顺利通过了。

|