/*************************************************************************
* 响应: 500 OOPS: priv_sock_get_int 错误: 读取目录列表失败
* 说明:
* 使用了Android的Kernel来做Linux系统开发,自己搭的文件系统运行vsftp出现
* 500 OOPS: priv_sock_get_int报错,原因是Android内核检查机制导致的。
*
* 2017-10-11 深圳 南山平山村 曾剑锋
************************************************************************/ 一、参考文档:
. vsftpd 服务移植出现 oops : socket 解决
http://www.cnblogs.com/chenfulin5/p/6912706.html 二、解决办法:
. cat net/ipv4/af_inet.c
...
#ifdef CONFIG_ANDROID_PARANOID_NETWORK
#include <linux/android_aid.h> static inline int current_has_network(void)
{
return in_egroup_p(AID_INET) || capable(CAP_NET_RAW);
}
#else
static inline int current_has_network(void)
{
return ;
}
#endif
...
. make menuconfig
.config - Linux/arm 3.0. Kernel Configuration
──────────────────────────────────────────────────────────────────────────────
┌────────────────────────── Networking options ───────────────────────────┐
│ Arrow keys navigate the menu. <Enter> selects submenus --->. │
│ Highlighted letters are hotkeys. Pressing <Y> includes, <N> excludes, │
│ <M> modularizes features. Press <Esc><Esc> to exit, <?> for Help, </> │
│ for Search. Legend: [*] built-in [ ] excluded <M> module < > │
│ ┌────^(-)─────────────────────────────────────────────────────────────┐ │
│ │ [ ] TCP: advanced congestion control ---> │ │
│ │ [ ] TCP: MD5 Signature Option support (RFC2385) (EXPERIMENTAL) │ │
│ │ < > The IPv6 protocol ---> │ │
│ │ [ ] Only allow certain groups to create sockets <---- 修改这里 | │
│ │ [*] Network activity statistics tracking │ │
│ │ [ ] Security Marking │ │
│ │ [ ] Timestamping in PHY devices │ │
│ │ [ ] Network packet filtering framework (Netfilter) ---> │ │
│ │ < > The DCCP Protocol (EXPERIMENTAL) ---> │ │
│ └────v(+)─────────────────────────────────────────────────────────────┘ │
├─────────────────────────────────────────────────────────────────────────┤
│ <Select> < Exit > < Help > │
└─────────────────────────────────────────────────────────────────────────┘
. 编译报错:
...
security/commoncap.c: In function 'cap_capable':
security/commoncap.c::: error: 'AID_NET_RAW' undeclared (first use in this function)
security/commoncap.c::: note: each undeclared identifier is reported only once for each function it appears in
security/commoncap.c::: error: 'AID_NET_ADMIN' undeclared (first use in this function)
make[]: *** [security/commoncap.o] Error
make: *** [security] Error
...
. 解决编译报错:
cat security/commoncap.c
...
int cap_capable(struct task_struct *tsk, const struct cred *cred,
struct user_namespace *targ_ns, int cap, int audit)
{
/*
if (cap == CAP_NET_RAW && in_egroup_p(AID_NET_RAW))
return 0;
if (cap == CAP_NET_ADMIN && in_egroup_p(AID_NET_ADMIN))
return 0;
*/
...
}
...

响应: 500 OOPS: priv_sock_get_int 错误: 读取目录列表失败的更多相关文章

  1. [linux]解决vsftpd 读取目录列表失败的问题

    使用第三方FTP软件filezilla进行登陆,出现如下错误:状态:    正在连接 192.168.1.6:21...状态:    连接建立,等待欢迎消息...响应:    220 (vsFTPd ...

  2. FileZilla 错误425 Can't open data connection 读取目录列表失败

    新装FileZilla FTP Server,设置好后,客户端能连接,但是出Error:[读取目录列表失败]:同时,服务端出Error:[425 Can't open data connection] ...

  3. FTP软件Filezilla出现“读取目录列表失败”的解决办法

    FTP软件Filezilla出现“读取目录列表失败”情况一般出现在vista/win7系统上,之前在xp上没发现这种情况. 总的来说,不论是打开FTP出现乱码或者显示“读取目录列表失败”均是由字符集引 ...

  4. 解决vsftpd 2.2.2读取目录列表失败的问题

    该错误是由iptables的配置引起的,临时的解决方法是执行如下命令: [root@localhost soft]# modprobe ip_nat_ftp 再次登陆列表正常啦! 但当你重新启动服务器 ...

  5. ftp 读取目录列表失败

    在防火墙设置的“例外”选项卡中添加程序: C:\WINDOWS\system32\inetsrv\inetinfo.exe,确定即可!

  6. FTP 150 Opening BINARY mode data connection for MLSD 读取目录列表失败

    这完全是因为防火墙的问题,把服务器的防火墙关闭之后,在连接,一切ok

  7. filezilla pureftpd 读取目录列表失败

    放行   21, 39000 - 40000端口

  8. 响应: 500 OOPS: vsftpd: refusing to run with writable root inside chroot()

    原vsftpd服务器的系统从centos6.8升级到centos7.2.vsftpd使用yum方式安装,用户采用系统用户登录.由于系统升级到centos7,yum安装的vsftpd版本改变.因此按ce ...

  9. TP6 服务器响应500时没有错误信息的解决方案

    重点!!!! 首先,确认你的电脑管理员账户是否含有中文!!!!!!就像下面这种:所以出现了没有错误提示    查看nginx日志显示\vendor\topthink\framework\src\thi ...

随机推荐

  1. Maven– HelloWorld实例

    Maven– HelloWorld实例 maven安装好后,可以通过HelloWorld项目来体验一下maven是如何构建项目的.Maven项目的核心是pom.xml(就像Ant的build.xml一 ...

  2. CentOS7安装mysql-python模块

    # sudo pip install mysql-python 此时会提示找不到mysql-config文件,我们安装一下mysql-community-devel # sudo yum instal ...

  3. 常用linux shell脚本记录

    遍历目录下所有的文件是目录还是文件 for file in ./* do if test -f $file then echo $file 是文件 fi if test -d $file then e ...

  4. python16_day40【数据结构】

    一.链表 #!/usr/bin/env python # -*-coding:utf8-*- __author__ = "willian" # 一.简单链表 class Node( ...

  5. Java之父及Java诞生

    来自为知笔记(Wiz)

  6. LCS 最长公共子子串

    与 最长公共子序列类似 只是最长公共子串必须连续 所以只能走斜线!!!! ''' LCS 最长公共子序列 ''' def LCS_len(x, y): m = len(x) n = len(y) dp ...

  7. hdu5012 圆环相交面积

    题中给了 两个同心圆, 一个大圆一个小圆,然后再给了一个大圆一个小圆也是同心圆,求这两个圆环相交的面积,用两个大圆面积减去两倍大小圆面积交加上两个小圆面积交,就ok了 这里算是坑明白了 使用acos的 ...

  8. 20145118 《Java程序设计》第1周学习总结

    20145118 <Java程序设计>第1周学习总结 教材学习内容总结 由于寒假在家已经安装了java开发工具,所以安装过程在这里不再赘述.这一周我开始了Java初学阶段,从Java的历史 ...

  9. target='_blank' 安全漏洞

    有关 target="_blank" 的安全缺陷 可能大家在写网页的时候经常给超链接加个属性 target="_blank",意思就是在浏览器新的窗口打开此超链 ...

  10. 《Effective Java 2nd》第8章 通用程序设计

    目录 第45条 将局部变量的作用域最小化 第46条 for-each循环优先于传统的for循环 第47条 了解和使用类库 第48条 如果需要精确的答案,避免使用float和double 第49条 基本 ...