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


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to