From: w6i@ornl.gov (John C. Wingenbach) Subject: Re: General Unix question Date: Wed, 7 Jul 1993 14:29:51 GMT
In article <741880761.AA01918@f262.n620.z3.fidonet.org> compsol@fir.canberra.edu.au (ben elliston) writes:
>I'm trying to write a general Unix (incl. Linux) program which will attempt to
>read and modify a file owned by root. What needs to be done in coding or
>installing the program to ensure that the program can have priviledges to this
>file?
Depends on who is going to run it? I assume the program is to be run by
non-root user.
Simply write the program as if permissions were not a problem. When it
comes time to use the program. Use 'chmod 4755 program' and 'chown root
program'. This will set the executable up as owned by root and executable by
anyone. The 4 in chmod will set it so that executing it informs the OS to act
as if the user running it is (in this case) root.
John C. Wingenbach Martin Marietta Energy Systems
Data Systems Research & Development
w6i@ornl.gov Oak Ridge Technical Center III
(615) 574-8345 1099 Commerce Park
(615) 574-0792 (FAX) Oak Ridge, TN 37830