[TriLUG] safe script to change ownership of a file or files.

skippy1 at hickorytech.net skippy1 at hickorytech.net
Sun Dec 19 17:08:28 EST 2004


I don't know of anything that specifically allows a non-proveleged user to
change ownership.

I would probably use sudo but write a wrapper script for it that validates
all of the input and calls sudo itself.  If you want to be extra paranoid,
the wrapper could be owned by dummy non-priv userid and set suid.  That
way only the dummy userid actually has sudo privelege.

Skippy
skippy at skippylair.net

> I have a need have a non-priveleged user change ownership on a file to
> another non-priveleged user.
> Is there a secure why to allow this in RedHat ES 3.0 (ES does not allow
> this currently)
> Sudo might work; however, I wanted to be
> sure that there was no way a "dangerous" parameter might be passed in,
> i.e, one that might allow
> an unintentional command to be executed.
>
> i.e. mychangeown.sh filename  == were filename could not be some type of
> string that would
> allow arbitrary code to execute.
>
> ------------------
> Marvin Blackburn
> Systems Administrator
> Glen Raven
> "He's no failure.  He's not dead yet" --William Lloyd George
> --
> TriLUG mailing list        :
> http://www.trilug.org/mailman/listinfo/trilug TriLUG Organizational FAQ
> : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
> TriLUG PGP Keyring         : http://trilug.org/~chrish/trilug.asc






More information about the TriLUG mailing list