The POSIX spec for the chown utility mentions in its rationale section about the chown user:group syntax (formerly chown user.group) (emphasis mine):The 4.3 BSD method of specifying both owner and group was included in this volume of POSIX.1-2008 because:There are cases where the desired end condition could not be achieved using the chgrp and chown (that only changed the user ID) utilities. (If the current owner is not a member of the desired group and the desired owner is not a member of the current group, the chown() function could fail unless both owner and group are changed at the same time.)I thought the user:group syntax was a convenience thing. Now the above implies there are things you can do with chown user:group that you can't with chgrp group; chown userNow that text doesn't make sense to me. In 4.3BSD, only root could change the owner a file so in any case there's no restriction in what he can do.SysV and a few other systems allow (or used to allow) the owner of a file to change the user and group of a file to anything, but even in those system, that text above doesn't make sense to me. OK, if one does do a chown someone-else the-file, one cannot do chgrp something-else the-file afterwards because one is no longer the owner of the file, but there's nothing preventing him/her from doing the chgrp first (staying the owner of the file) and chown after, and that's not what the text above is exactly saying.I don't understand what the and the desired owner is not a member of the current group has to do with the problem.So what are the conditions for which the chown() function could fail unless both owner and group are changed at the same time, and on what system?
explanation on chown(1) POSIX spec
posix;chown