Re: Script to allow non-root read acces to a root owned file
- From: Tony van der Hoff <news@xxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 16 Jan 2007 12:08:42 +0000
On 16 Jan at 11:09 Justin C <justin.0511@xxxxxxxxxxxxxx> wrote in message
<slrneqpcif.eta.justin.0511@xxxxxxxxxxxxxxxxxxxxxxx>
(Debian AMD64 unofficial stable)[snip]
There is a log file I don't want to give regular users direct access to
but I want to write a script that will grep that file for a string,
provided on the command line when calling the script, and return some
information.
I'm planning on doing this in perl (but I may be persuaded to use bash).
Any suggestions on how I write a script that can be run by a user and
access a file to which they have no permission?
Set the ownership of the script to whoever has permission to open the file,
with exec permission to the appropriate group, and make it suid owner (chmod
4711 or so).
--
Tony van der Hoff | mailto:tony@xxxxxxxxxxxxxx
Buckinghamshire, England
.
- Follow-Ups:
- Re: Script to allow non-root read acces to a root owned file
- From: Tony Houghton
- Re: Script to allow non-root read acces to a root owned file
- References:
- Script to allow non-root read acces to a root owned file
- From: Justin C
- Script to allow non-root read acces to a root owned file
- Prev by Date: Re: Synchronising local ext3 tree onto vfat device
- Next by Date: Re: Synchronising local ext3 tree onto vfat device
- Previous by thread: Script to allow non-root read acces to a root owned file
- Next by thread: Re: Script to allow non-root read acces to a root owned file
- Index(es):