Re: chown
Dave Sherohman writes:
> chown(1) is the command-line program. chown(2) is the underlying system
> call used by chown(1) to do its dirty work, which is relevant here
> because chown(2)'s man page explicitly mentions that it only works for
> priviliged users, but chown(1)'s doesn't.
It isn't that simple. From 'man 2 chown':
These system calls change the owner and group of the file specified
by path or by fd. Only a privileged process (Linux: one with the
CAP_CHOWN capability) may change the owner of a file. The owner of
a file may change the group of the file to any group of which that
owner is a member. A privileged process (Linux: with CAP_CHOWN) may
change the group arbitrarily.
--
John Hasler
Reply to:
- References:
- chown
- From: "Gilberto Martins" <zigotto@gmail.com>
- Re: chown
- From: Paul Dwerryhouse <paul@dwerryhouse.com.au>
- Re: chown
- From: Kent West <westk@acu.edu>
- Re: chown
- From: Paul Dwerryhouse <paul@dwerryhouse.com.au>
- Re: chown
- From: Kent West <westk@acu.edu>
- Re: chown
- From: Clive Menzies <clive@clivemenzies.co.uk>
- Re: chown
- From: Dave Sherohman <esper@sherohman.org>