Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!sri-unix!rutgers!mit-eddie!uw-beaver!tektronix!tekgen!teksce!johnhi From: johnhi@teksce.SCE.TEK.COM (John Higley) Newsgroups: comp.unix.questions Subject: A problem creating files... Message-ID: <884@teksce.SCE.TEK.COM> Date: Mon, 7-Dec-87 19:27:57 EST Article-I.D.: teksce.884 Posted: Mon Dec 7 19:27:57 1987 Date-Received: Sun, 13-Dec-87 08:58:50 EST Reply-To: johnhi@teksce.UUCP (John Higley) Organization: Tektronix, Inc., Beaverton, OR. Lines: 28 Keywords: ...as real user instead of effective user. I have a problem that I would like to pose to "the experts". I have written an application that may be run at any time any day and updates some files. The application places locks on the files when this user needs to write. For any user to be able to update these files, it is necessary that the application be run either suid or sgid to 'me'. This is fine. At certain times during the day a 'master' process needs to take the daily update files and use them. For that to happen successfully, I must kill any users of the original application. (Some of the data files are large, and having processes attached to the files causes old files to remain open even after they are removed, as you are no doubt aware.) This causes the need for the application to be run suid to me. Again, this is fine. Now for the problem: The user of the application wants to be able to create an output file for certain information that he has found. Unfortunately, the output file belongs to me (suid) and I do not have write permission in his directory. What I would like to occur is that the output file belong to the real user (him) not the effective user (me). Any ideas? Any questions? (sometimes I don't say what I thought I said) Maybe the answer lies in how to kill the application so that it can run sgid instead of suid. Right now I (the master process) send the USR1 and USR2 signals, which the application is made to interpret. John Higley johnhi@teksce.SCE.TEK.COM.UUCP