/*************************************************************************
* 响应: 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. C++中定义NULL的头文件

    NULL不是C语言基本类型,其定义在stddef.h文件中,作为最基本的语言依赖宏存在.但是随着C/C++的发展,很多文件只要涉及了系统或者标准操作都会将NULL作为标准宏声明或者包含.所以几乎包含任 ...

  2. AtCoder Beginner Contest 114 Solution

    A 753 Solved. #include <bits/stdc++.h> using namespace std; ]; int main() { mp[] = mp[] = mp[] ...

  3. uva11324 有向图的强连通分量+记忆化dp

    给一张有向图G, 求一个结点数最大的结点集,使得该结点集中任意两个结点u和v满足,要么u可以到达v, 要么v可以到达u(u和v相互可达也可以). 因为整张图可能存在环路,所以不好使用dp直接做,先采用 ...

  4. mongoose 获取某个存在的collecion 里的数据

    在创建Schma 时指定对应的collection var db_url = 'mongodb://localhost:27017/test'; var db = mongoose.connect(d ...

  5. javascript数组总结

    数组是一个有序的集合,javascript数组中的元素的类型可以是任意的,同一个数组不同元素之间的类型也是可以不同的.数组也是对象,有个length属性,记录数组的长度. 创建数组有两种方法: 数组直 ...

  6. mssql语句递归查找所有下级

    if exists (select * from sys.all_objects where name='GetOrgTree') begin drop function GetOrgTree end ...

  7. Vue学习笔记之Vue的箭头函数

    0x00 箭头函数 基本语法: ES6允许使用“箭头”(=>)定义函数 var f = a = > a //等同于 var f = function(a){ return a; } 如果箭 ...

  8. 20145204 《Java程序设计》第9周学习总结

    20145204 <Java程序设计>第9周学习总结 教材学习内容总结 JDBC Java语言访问数据库的一种规范,是一套API.JDBC (Java Database Connectiv ...

  9. P4factory ReadMe 剩余部分

    Building and Running a Target Each P4 program (called a 'target') is set up in a directory under tar ...

  10. ros 杀掉所有节点

    rosnode kill -a 或者 rosnode kill --all