LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Socket(): permission denied (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/socket-permission-denied-915704/)

hammil1 11-26-2011 07:01 PM

Socket(): permission denied
 
Hi guys,
Got an experimental Debian build on an ARM system, but having some problems with sockets.
Basically, everything runs fine as root, but as a standard user I can't even ping. I ran an strace for "ping 192.168.0.1" and got this fatal line :
Socket(...): -1 EACCES permission denied
Since socket() is a system call, I'm not too sure where the permission settings are.
Thanks,
Hamish

clvic 11-30-2011 07:27 AM

Hello, the problem is that making a ping opens a raw socket, not a TCP one...
so it's not surprising that it's forbidden to normal users. Ping is "suid" in unix systems, so maybe in your system it is not... try setting it suid:
Code:

chmod +s /bin/ping


All times are GMT -5. The time now is 03:54 PM.