Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 10-11-2005, 12:15 AM   #1
LQ Newbie
Registered: Oct 2005
Distribution: RH 9
Posts: 24

Rep: Reputation: 15
Can We Run Raw Sockets With User Permissions

hi all,

can we run raw sockets with user permissions.....................
Old 10-11-2005, 01:45 AM   #2
Wim Sturkenboom
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Not directly. Use setuid/seteuid to change the user temporaryly. Example
Old 10-27-2005, 07:03 AM   #3
LQ Newbie
Registered: Oct 2005
Distribution: RH 9
Posts: 24

Original Poster
Rep: Reputation: 15
ok lets say i go by ur method...

and when i open the socket it will be in root

and after that can i set back to non-root cause i need a file to be opened and the data from the socket must be written to the file..............


Setting To Root

Opening the Socket

Setting Back To Non -Root

Opening the file and storing the data..........



programming, setuid

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Raw Ethernet Sockets alanwolfen Programming 2 01-06-2005 07:51 PM
raw sockets and C wrongman Programming 3 05-04-2004 03:17 PM
can I use mmap with raw sockets? kanth Programming 2 02-28-2004 01:42 PM
Raw sockets root user work around P_Shep Programming 2 11-18-2003 12:35 PM
raw sockets BashTin Programming 1 06-07-2003 07:34 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:19 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration