Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-15-2010, 02:21 PM   #1
LQ Newbie
Registered: Aug 2010
Posts: 3

Rep: Reputation: 0
Using route command with a non root process

Heres the scenario -
I use the system command route from a process (using the system() call). For security reasons the process does not have root privilege and for some reason I cannot use ioctl() either.
I tried to set the capabilities of the process to NET_ADMIN and SYS_ADMIN but the route command still failed due to insufficient permissions.

Question --
What are the capabilities that I need to set for route to be successful?

Thanks in advance
Old 09-15-2010, 08:52 PM   #2
Senior Member
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,125
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
All you need is NET_ADMIN. Where did you set the capabilities? If you tried to do them from within the process you probably didn't have sufficient privs to do so.

if you did the following as root:
setcap cap_net_admin=+eip /sbin/route

anyone that could run the route command could do routing changes. so a possibility is to make /sbin/route mode 0550 and a special routing group and have the process be run by a user in that routing group.
1 members found this post helpful.



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
IPC fails between user process and root process zaryab Linux - Newbie 1 09-22-2008 01:25 AM
Default route took 20s to display with 'route' command Akhran Linux - Newbie 3 11-04-2006 04:59 AM
I am not able to add a new route to my route table using route command prashanth s j Linux - Networking 2 09-03-2005 04:34 AM
Need help with route command dalek Linux - Networking 5 07-15-2005 12:26 AM
'route' and root permissions CatSC Linux - Newbie 1 11-12-2003 04:51 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:55 AM.

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