Why root permissions required for creating of RAW Socket


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Why root permissions required for creating of RAW Socket
# 1  
Old 04-27-2009
Why root permissions required for creating of RAW Socket

To create RAW socket in Unix/Linux why should one have root permissions?
Any other work around to create raw sockets in Unix/Linux using a normal login id? Since I don't have super user credentials and I want to create RAW sockets.
Let me know if you are aware of any work around.

Last edited by anilgurwara; 04-27-2009 at 08:18 AM..
# 2  
Old 04-27-2009
The reason is, with raw sockets, you can do things like fake packets etc. which ordinary programs really have no need to do.
# 3  
Old 04-28-2009
I don't buy your thought...
There must be some way out to create raw sockets without having root login.
Can anyone share his/her experience??
# 4  
Old 04-28-2009
Quote:
Originally Posted by anilgurwara
I don't buy your thought...
Well, good for you... Unfortunately it even says so in the 'raw' manpage:
Code:
Only processes with an effective user ID of 0 or the CAP_NET_RAW  capability are allowed to open raw sockets.

Raw access is needed by protocols, which are generally a part of the kernel, not usermode things.
Quote:
There must be some way out to create raw sockets without having root login.
You can't even send ICMP packets without root. If there was a better way they wouldn't need to have a setuid bit on ping. Which would be one way to get root when you need it, setuid bits. or sudo.

Last edited by Corona688; 04-28-2009 at 01:54 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Installing TCP-MUX protocol socket help required.

I been looking for a good guide or some help on how to install and setup TCP-MUX protocol socket on my Solaris 7 servers. Can anyone point me in right direction of help me ? Thanks (5 Replies)
Discussion started by: Wpgn
5 Replies

2. Programming

Raw Socket Programming - Efficient Packet Sniffer

Hi, I have the requirement to sniff packets from the Ethernet card on my Linux machine and process it and feed it to a RANAP protocol stack. So far I have written the raw packet sniffer and successfully sniffing packets and do little processing. However, for huge number of packets ... (9 Replies)
Discussion started by: rstnsrr
9 Replies

3. Shell Programming and Scripting

Help required for creating script.

I want to create a shell script which should be doing following things .. i have the commands but do not know how to tie them up together. 1. . Go to a pre-defined directory and look for a specific pattern txt files like abc12* and select the latest file with abc12* ls |awk '{if($NF... (4 Replies)
Discussion started by: fugitive
4 Replies

4. UNIX for Dummies Questions & Answers

Creating a File system with required permissions for all DIR's created in

Hello All, I am application admin. I need to clear all the temporary files cleared by the applications. I need help/suggestion that is there any way to create a file system such that every Dir created in by any user will have 775 permissions. So, that i can simply clear the temporary file which... (6 Replies)
Discussion started by: firestar
6 Replies

5. Programming

creating socket()

deleted (7 Replies)
Discussion started by: satish@123
7 Replies

6. IP Networking

Changing the source IP?? using RAW Socket.

Hi There, Suppoose we have configured logical Interface 2.2.2.2 on a server with Primary IP 1.1.1.1. Now when I am sending a packet from this server, is it possible to make receiver assume that this packet has come from IP 2.2.2.2 and not 1.1.1.1 I think it is possibl using RAW sockets??? but... (1 Reply)
Discussion started by: Ankit_Jain
1 Replies

7. HP-UX

Root Permissions

Hi all, I cannot change root owned files/directories even though I am logged in as root. >drwxr-xr-x 11 root root 4096 Oct 25 14:00 prodbkp >root / # chown oracle prodbkp prodbkp: Not owner >id uid=0(root) gid=3(sys) groups=0(root) please assist. thanks (0 Replies)
Discussion started by: macgre_r
0 Replies

8. Linux

permissions to su to root

What is the file you have to edit to allow or deny someone to be able to su - to root? (4 Replies)
Discussion started by: BG_JrAdmin
4 Replies

9. Programming

RAW socket and CONFIG_FILTER

Hi, Im doin a project on DHCp client-server setup. i have to use RAW sockets in the code for this. The call PF_PACKET, SOCK_RAW as the first two arguments. The code compiles but when i try to start the Dhcp client, I get an error saying "Make sure CONFIG_PACKET and CONFIG_FILTER is enabled". I... (4 Replies)
Discussion started by: yannifan
4 Replies
Login or Register to Ask a Question

Featured Tech Videos