Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

[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
$ chgrp anothergroup /tmp/new_file
chgrp: changing group of `/tmp/new_file': Operation not permitted
$ sudo chown :anothergroup /tmp/new_file # Works fine.
share|improve this question
up vote 3 down vote accepted


This account is a member of both groups.

Yes, but I had only just been added as a member, and hadn't re-logged in yet, so the change hadn't yet propagated to the shell.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.