[Already solved by OP: See answer.]
I had some code running on an old version of Ubuntu (Karmic Koala). Machine was rebuilt to Ubuntu 11.10, and now my code falls over.
It is doing the equivalent of this to change a file's group ownership to another group which I'm in:
$ touch /tmp/new_file
$ ls -la /tmp/new_file
-rw-rw-r-- 1 me mygroup 0 Nov 20 15:39 /tmp/new_file
$ chown :anothergroup /tmp/new_file
chown: changing group of `/tmp/new_file': Operation not permitted
Why can't I change the group ownership of a file that I own? I thought that was allowed. I am missing something.
This account is a member of both groups.
More info:
$ umask
0002
$ chgrp anothergroup /tmp/new_file
chgrp: changing group of `/tmp/new_file': Operation not permitted
$ sudo chown :anothergroup /tmp/new_file # Works fine.
