Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!samsung!munnari.oz.au!mel.dit.csiro.au!yarra!pta!teti!teslab!charles From: charles@teslab.lab.OZ (Charles Widepy) Newsgroups: comp.unix.questions Subject: File owned by program - how to do it? Summary: Make a program setuid to what user? Where do you put a file that belongs to the program? How to files only readable by one person (and not writeable)? Message-ID: <1266@teslab.lab.OZ> Date: 18 Jun 91 06:27:09 GMT Reply-To: charles@teslab.lab.oz.au (Charles Widepy) Organization: Technology Evaluation Section, L.A.B., Sydney Lines: 23 I have a program that many people need to use but which needs to maintain one file to keep a small amount of info. (Actually its a game, but it is a general problem requiring a solution.) Obviously it has to be a setuid program. The question is what user does the program belong to? Should it be "bin" or should I create a new user (game?)? I don't what it to be "root" just in case there are bugs in it. More importantly, where should I put the file that the program owns - /usr/lib or maybe /usr/local/lib? While we're on the subject of files: As root how would I make a set of files in a certain directory only readable (not writeable) by one particular user and not accessable by anyone else. I thought of making the directory owned by the user and making it r-x------, but if he owns it he can change the rights on it. The only other thing I can think of is to create a unique group for every user I want to do this for. Thanks for any help. -- / \ CWW charles@teslab.lab.oz.au \_.--._/ ..!uunet!munnari!teslab.lab.oz!charles