Way back when, chown could be run by everyone. Berkeley Unix saw that as a bad idea and made it root only. Nowadays POSIX says it's up to you.
The default for Unix systems is that users can't change the ownership of files. That's probably the way it should be left, as the ability to do so opens up very bad security issues. Nevertheless, some systems allow this. It may be from a setting in /etc/system:
Or, it may be "sysctl" that controls this:
sysctl -a | grep chown fs.xfs.restrict_chown = 1
For these, a setting of 0 would allow non-root users to use chown.
On other systems, this sort of thing is a "privilege": HP-UX setprivgrp lets you control this (and other things) at the group level. Of course this can be allowed through sudo or similar privilege escalation
Got something to add? Send me email.
More Articles by Tony Lawrence © 2009-11-07 Tony Lawrence