LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-23-2007, 10:40 AM   #1
senthilpr_in
LQ Newbie
 
Registered: Aug 2005
Distribution: FC4 2.6.11-1.1369_FC4smp
Posts: 21

Rep: Reputation: 15
How to start a process with specific uid/gid during bootup?


Hi all,

I have a process which I startup at boot time by adding the following line to my rc.local file

/usr/local/dcmtk/bin/dcmqrscp -c /home/db/dcmqrscp.cfg 2100 &

'dcmqrscp' is a server program, which receives files and writes them to a temp directory on disk. All Users can run a script which processes the files in this temp directory and deletes them after the processing is complete. The temp directory has 777 permission, but the files are created (by dcmqrscp) with a default permission of 644 and with the owner being root.

Should I start 'dcmqrscp' with a specific gid, to which all my users belong, so that they can delete the files in the temp directory, once they are done with their processing? What I'm looking for, is a way to make all the files created by 'dcmqrscp' program, world writeable, so that the script run by my users, will delete these files, once the processing is complete.

Thanks!

Senthil
 
Old 05-23-2007, 04:07 PM   #2
rednuht
Member
 
Registered: Aug 2005
Posts: 239
Blog Entries: 1

Rep: Reputation: 31
change the owner of the app to a user that has the required permissions and setuid the executable.
or change the owner of the folder and set setuid
read up on both of these http://en.wikipedia.org/wiki/Setuid
 
Old 05-23-2007, 04:10 PM   #3
mattsoftnet
Member
 
Registered: Jan 2006
Posts: 120

Rep: Reputation: 15
that's all you have to do?

so scripts and binaries run under whatever user owns the file?
 
Old 05-23-2007, 10:00 PM   #4
hackintosh
Member
 
Registered: Dec 2005
Posts: 52

Rep: Reputation: 15
u never know the danger of using SETGID and SETUID.

better pray your server dont break by others
 
Old 05-23-2007, 10:18 PM   #5
mattsoftnet
Member
 
Registered: Jan 2006
Posts: 120

Rep: Reputation: 15
Quote:
Originally Posted by hackintosh
u never know the danger of using SETGID and SETUID.

better pray your server dont break by others

then what is the right way to do it?
 
Old 05-23-2007, 11:22 PM   #6
hackintosh
Member
 
Registered: Dec 2005
Posts: 52

Rep: Reputation: 15
Quote:
Originally Posted by mattsoftnet
then what is the right way to do it?
as i mention in the security sub-forum, use sudo to instead of setuid or setgid.
 
  


Reply



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
what is uid and gid rmanocha Linux - Software 9 08-18-2008 11:03 PM
Changing the UID of a Physical Volume to a specific UID jambraun Linux - Newbie 2 02-09-2006 02:34 PM
What is my uid/gid? Jeebizz Slackware 2 11-22-2005 11:39 AM
How can I change a user's uid and gid? homesp Debian 2 05-31-2005 02:39 PM
changing uid, gid zeke1955 Linux - General 4 01-09-2004 11:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration