LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
Search this Thread
Old 09-22-2008, 01:07 AM   #1
zaryab
LQ Newbie
 
Registered: Sep 2008
Posts: 2

Rep: Reputation: 0
IPC fails between user process and root process


I am using a CGI process to spawn a new process using execl system call. Both the CGI and the spawned processes are owned by user "www". The spawned process need to communicate with a system process owned by "root". The user "www" has lower privileges than the "root".

I have tried pipes and msg queues for IPC between the root process and the www process, but unfortunately both fail.

Am I doing something wrong? Generally speaking can a process with lower privilege send messages to a higher privilege process or to root process in Linux? If yes, is there a method that I am unaware of.

Thanks,
Zaryab
 
Old 09-22-2008, 02:25 AM   #2
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Pipes have permissions, so it is a matter of setting the permissions correctly. Be extremely careful passing data like this to a root-owned process; it opens up the system like WinDuhs.

An alternative is to use UNIX sockets (but you still need to assume that data coming into the root side cannot be trusted).

Are you sure there's no other way to get data without a root process?
 
  


Reply


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
Start a program for a user as root, with process belonging to user gnashley Programming 4 03-19-2007 02:58 PM
Boot process as non-root user fatman Debian 6 06-07-2005 05:08 PM
IPC Process! UltraSoul Solaris / OpenSolaris 1 02-04-2005 01:44 PM
IPC message between process (Sync) davidho3 Linux - Networking 1 07-24-2004 09:20 AM
IPC message between process (Sync) davidho3 Programming 1 07-24-2004 08:37 AM


All times are GMT -5. The time now is 08:46 PM.

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