德州仪器
直播中

陈鹏

7年用户 211经验值
私信 关注
[问答]

无法设置CAP_SETFCAP有效功能

你好,
我是从PocketBeagle这个话题发来的 -  Linux上的Linux  -  eewiki。
基本上我按照说明启动了基于iMX的评估板。
我用
rootfs的https://rcn-ee.com/rootfs/eewiki ... f-2017-12-09.tar.xz
电路板启动正常,我登录确定(ubuntu / tempwd,从串口登录),无法ping 8.8.8.8。
我可以从网络中的其他计算机ping板,但由于权限问题,板本身无法ping通。
我知道我是root,因为我可以做dd命令等...我可以调用“ping --help”但不能执行“ping 8.8.8.8”。
我按照某人注意“setcap cap_net_raw + p / bin / ping”但遇到消息“无法设置CAP_SETFCAP有效功能:操作不允许”。
我找不到任何其他提示来解决这个问题。
你能帮忙吗?
顺便说一句,当我做“sudo ping 8.8.8.8”时,我遇到了消息“sudo / usr / bin / sudo必须由uid 0拥有并且设置了setuid位”

以上来自于谷歌翻译


以下为原文

        hello,
I was sent from this topic PocketBeagle - Linux on ARM - eewiki. Basically I followed the instructions to boot up an iMX based evaluation board. I use
https://rcn-ee.com/rootfs/eewiki ... f-2017-12-09.tar.xz for rootfs. The board booted up fine and I logged in ok (ubuntu/tempwd, logged in from the serial port), failed to ping 8.8.8.8.
I can ping the board from other computer in the network but the board itself cannot ping because of permission issue. I know I am root, as I can do dd command, etc… I can call “ping --help” but cannot do “ping 8.8.8.8”.
I followed someone note “setcap cap_net_raw+p /bin/ping” but met with message “unable to set CAP_SETFCAP effective capability: Operation not permitted”.
I cannot find any other hints to solve this problem. Can you please help ?
By the way, when I do “sudo ping 8.8.8.8”, I was met with message “sudo /usr/bin/sudo must be owned by uid 0 and have the setuid bit set”

回帖(4)

郭雨桐

2018-10-24 16:35:27
@eelinux
你有没有连接到网络?
sudo ifconfig -a
sudo dhclient eth0
默认情况下,该特定的ubuntu映像没有安装connman自动连接到网络。
我有一个较新的版本ubuntu,我正在慢慢推出,只是在valding /更新所有页面的过程中...
你可以在这里抓住它:
https://www.digikey.com/eewiki/display/linuxonarm/A10-OLinuXino-LIME#A10-OLinuXino-LIME-Ubuntu18.04LTS
问候,

以上来自于谷歌翻译


以下为原文

        @eelinux
Did you connect to the network?
sudo ifconfig -asudo dhclient eth0That specific ubuntu image didn’t have connman installed by default to auto connect to the network.
I’ve got a newer version ubuntu that i’m slowly rolling out, just in the process of valding/updating all pages…
You can grab it here:
https://www.digikey.com/eewiki/display/linuxonarm/A10-OLinuXino-LIME#A10-OLinuXino-LIME-Ubuntu18.04LTS
Regards,
举报

陈桂兰

2018-10-24 16:41:10
@RobertCNelson
是的,我的电路板连接到网络并分配了IP地址。
我可以ping通电路板,但电路板无法ping通全世界。
有两个问题,第一个sudo命令确实有效(遇到udo / usr / bin / sudo必须由uid 0拥有并设置setuid位)。
第二,似乎有网络权限问题,当ping 8.8.8.8(遇到icmp open socket:不允许操作)
您能否与我分享您如何通过构建rootfs来解决此问题?

以上来自于谷歌翻译


以下为原文

        @RobertCNelson
Yes, my board connected to the network and was assigned IP address. I can ping the board but the board cannot ping the world. There are 2 issues, first sudo command does work ( met with udo /usr/bin/sudo must be owned by uid 0 and have the setuid bit set). Second, there seems to be network permission issue, when ping 8.8.8.8 (met with  icmp open socket: Operation not permitted)
Can you please share with me how you may resolve this issue by with your building rootfs ?
举报

郭雨桐

2018-10-24 16:51:09
@eelinux
刚刚在DE0 Altera板上安装了旧的ubuntu 16.04.3-minimal-armhf-2017-12-09。
Ubuntu 16.04.3 LTS arm ttyS0
默认用户名:密码是[ubuntu:temppwd]
arm登录:ubuntu
密码:
欢迎来到Ubuntu 16.04.3 LTS(GNU / Linux 4.9.78-ltsi-socfpga-r4 armv7l)
ping只是工作......
ubuntu @ arm:〜$ ifconfig -a
eth0链接封装:以太网HWaddr e2:e7:c4:00:49:6b 
inet addr:192.168.0.117 Bcast:192.168.0.255掩码:255.255.255.0 
inet6 addr:fe80 :: e0e7:c4ff:fe00:496b / 64范围:链接 
UP BROADCAST RUNNING MULTICAST动态MTU:1500公制:1 
RX数据包:86个错误:0丢弃:0超限:0帧:0 
TX数据包:61个错误:0丢弃:0溢出:0载波:0 
碰撞:0 txqueuelen:1000 
RX字节:13566(13.5 KB)TX字节:7953(7.9 KB) 
中断:27基地址:0x2000
lo Link encap:Local Loopback 
inet addr:127.0.0.1掩码:255.0.0.0 
inet6 addr::: 1/128范围:主机 
UP LOOPBACK RUNNING MTU:65536公制:1 
RX数据包:164个错误:0丢弃:0超限:0帧:0 
TX数据包:164个错误:0丢弃:0超出:0载波:0 
碰撞:0 txqueuelen:1 
RX字节:12200(12.2 KB)TX字节:12200(12.2 KB)
ubuntu @ arm:〜$ ping 8.8.8.8
PING 8.8.8.8(8.8.8.8)56(84)字节的数据。
来自8.8.8.8的64字节:icmp_seq = 1 ttl = 114时间= 89.7 ms
来自8.8.8.8的64字节:icmp_seq = 2 ttl = 114时间= 79.0 ms
^ C
--- 8.8.8.8 ping统计---
2个包发送,2个接收,0%丢包,时间1001ms
rtt min / avg / max / mdev = 79.040 / 84.394 / 89.749 / 5.362 ms
我会说,仔细检查你的rootfs安装,chown / chmod对于纠正基本rootfs权限至关重要:
sudo tar xfvp ./*-*-*-armhf-*/armhf-rootfs-*.tar -C / media / rootfs /
同步
sudo chown root:root / media / rootfs /
sudo chmod 755 / media / rootfs /
问候,

以上来自于谷歌翻译


以下为原文

        @eelinux
Just installed the old ubuntu 16.04.3-minimal-armhf-2017-12-09 on a DE0 Altera board.
Ubuntu 16.04.3 LTS arm ttyS0default username:password is [ubuntu:temppwd]arm login: ubuntuPassword: Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.9.78-ltsi-socfpga-r4 armv7l)ping just works…
ubuntu@arm:~$ ifconfig -aeth0      Link encap:Ethernet  HWaddr e2:e7:c4:00:49:6b            inet addr:192.168.0.117  Bcast:192.168.0.255  Mask:255.255.255.0          inet6 addr: fe80::e0e7:c4ff:fe00:496b/64 Scope:Link          UP BROADCAST RUNNING MULTICAST DYNAMIC  MTU:1500  Metric:1          RX packets:86 errors:0 dropped:0 overruns:0 frame:0          TX packets:61 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:1000           RX bytes:13566 (13.5 KB)  TX bytes:7953 (7.9 KB)          Interrupt:27 Base address:0x2000 lo        Link encap:Local Loopback            inet addr:127.0.0.1  Mask:255.0.0.0          inet6 addr: ::1/128 Scope:Host          UP LOOPBACK RUNNING  MTU:65536  Metric:1          RX packets:164 errors:0 dropped:0 overruns:0 frame:0          TX packets:164 errors:0 dropped:0 overruns:0 carrier:0          collisions:0 txqueuelen:1           RX bytes:12200 (12.2 KB)  TX bytes:12200 (12.2 KB)ubuntu@arm:~$ ping 8.8.8.8PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.64 bytes from 8.8.8.8: icmp_seq=1 ttl=114 time=89.7 ms64 bytes from 8.8.8.8: icmp_seq=2 ttl=114 time=79.0 ms^C--- 8.8.8.8 ping statistics ---2 packets transmitted, 2 received, 0% packet loss, time 1001msrtt min/avg/max/mdev = 79.040/84.394/89.749/5.362 msI’d say, double check your rootfs install, the chown/chmod is critical to correct the base rootfs permissions:
sudo tar xfvp ./*-*-*-armhf-*/armhf-rootfs-*.tar -C /media/rootfs/syncsudo chown root:root /media/rootfs/sudo chmod 755 /media/rootfs/Regards,
举报

陈桂兰

2018-10-24 17:09:46
@RobertCNelson
谢谢您的帮助!
我再次按照你的指示,这次rootfs工作,sudo和ping。
这确实是许可问题。
我做错了是使用“sudo nautilus”来打开文件管理器并进行tar提取,复制和放大
通过拖放手动将rootfs粘贴到SD卡上。
显然,这来自Windows用户背景

以上来自于谷歌翻译


以下为原文

        @RobertCNelson
Thank you for your help! I have followed your instruction again and this time the rootfs worked, both sudo and ping. It was indeed permission issue. What I did wrong was using “sudo nautilus” to open file manager and did tar extract, copy & paste rootfs to SD card everything manually by drag and drop. Apparently, this came from a windows user background
举报

更多回帖

发帖
×
20
完善资料,
赚取积分