为什么 curl 在 tizen sdb 中显示权限被拒绝?

Why curl showing permission denied in tizen sdb?

我正在尝试使用来自 tizen sdb 的 curl 发送 http 请求。

我提出了类似 "curl -v example.com"

的请求

收到错误消息:

bash-3.2# curl -v example.com
* STATE: INIT => CONNECT handle 0x1e178d8; line 1398 (connection #-5000)
* Rebuilt URL to: example.com/
* Added connection 0. The cache now contains 1 members
*   Trying 93.184.216.34...
* TCP_NODELAY set
* Immediate connect fail for 93.184.216.34: Permission denied
* Closing connection 0
* The cache now contains 0 members
* Expire cleared
curl: (7) Couldn't connect to server

我可以使用浏览器应用请求。因此,设备的互联网连接没有问题。我还能够使用 libcurl 库从 tizen 本机应用程序发送 http 请求。但是来自 sdb shell,curl 请求不起作用。有人可以帮忙吗?

感谢同事的帮助,我终于找到了解决办法。原来需要在 运行ning binary in tizen 3.0 之前添加权限。以下命令需要 运行 in sdb shell(在 root 模式下)

# mount -o remount rw, /
# chsmack -e "System" /usr/bin/curl