[plug] chown as a user?
Christian
christian at amnet.net.au
Sat Jun 17 17:19:05 WST 2000
On Sat, Jun 17, 2000 at 06:23:53AM +0000, Trevor Phillips wrote:
>
> I need to be able to let a user change files owned by them, to be owned by
> someone else.
>
> eg; File X is owned by A, but A wants to pass it to B, so wants to do:
> chown B X
>
> When I do, though, it comes back with "Operation not permitted".
>
> How do I enable access to allow this? (Pref. for only one user to do it)
>
> Technically, I actually need to do this in a Perl CGI using Perl's chown() fn,
> but I'm assuming the limitation is the same there as for the system command.
>
> Yes, I've tried RTFMing, but haven't found any info (and doing a websearch on
> "chown" and "user" doesn't reveal anything useful).
You basically want a very tightly coded, small dedicated setuid root
program to do this. Remember, both the design and implementation of the
program need to be secure -- if you're not sure you can do this then
either abandon the idea entirely or get someone who is sure to do it for
you. Either way, I would examine Colin's suggestion of a shared group
between users A and B if that's at all feasible -- it has similar
results and is a lot simpler and secure.
Regards,
Christian.
More information about the plug
mailing list