bzr whoami: unable to copy ownership from '$HOME/.bazaar' to '$HOME/.bazaar/bazaar.conf'

Bug #661678 reported by Per Ångström
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned
bzr (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Binary package hint: bzr

Having recently installed Ubuntu 10.10 on one of my machines, using a repository created by an older version, I ran into a glitch executing bzr whoami:

pang@barbarossa:/home/project/autarkse$ bzr whoami pang
"pang" does not seem to contain an email address. This is allowed, but not recommended.
Unable to copy ownership from '/home/pang/.bazaar' to '/home/pang/.bazaar/bazaar.conf': IOError: [Errno 1] Operation not permitted: '/home/pang/.bazaar/bazaar.conf'.
pang@barbarossa:/home/project/autarkse$ ls -l /home/pang/.bazaar
-rw-r--r-- 1 pang pang 23 2010-10-16 13:23 bazaar.conf
pang@barbarossa:/home/project/autarkse$ ls -l /home/pang/.bazaar/bazaar.conf
-rw-r--r-- 1 pang pang 23 2010-10-16 13:23 /home/pang/.bazaar/bazaar.conf
However, after that I was able to commit my changes without any apparent problem.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: bzr 2.2.0-1
ProcVersionSignature: Ubuntu 2.6.35-22.33-generic 2.6.35.4
Uname: Linux 2.6.35-22-generic x86_64
Architecture: amd64
Date: Sat Oct 16 13:25:42 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release Candidate amd64 (20100928.1)
SourcePackage: bzr

Revision history for this message
Per Ångström (autark) wrote :
Revision history for this message
Martin Pool (mbp) wrote :

Hi, thanks for the report.

I wonder what the permission is on the directory? "ls -dl /home/pang/.bazaar" will tell you.

My guess is that you first ran bzr as root therefore it's still owned by root.

Changed in bzr (Ubuntu):
status: New → Incomplete
Revision history for this message
Per Ångström (autark) wrote :

$ ls -dl /home/pang/.bazaar/
drwxr-xr-x 2 pang users 4096 2010-10-16 13:23 /home/pang/.bazaar/

Changed in bzr (Ubuntu):
status: Incomplete → New
Revision history for this message
Martin Pool (mbp) wrote :

I guess the file was owned by root and now it's not. We couldn't really have done anything about this and I think giving a warning was fairly reasonable. Therefore I'm closing this. Feel free to reopen if it recurs repeatedly.

Changed in bzr:
status: New → Invalid
Changed in bzr (Ubuntu):
status: New → Invalid
Revision history for this message
Per Ångström (autark) wrote :

Fair enough!

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

It looks like this happens when changing the group of the new file, but the user isn't actually a member of the group we're setting.

Changed in bzr:
status: Invalid → Triaged
status: Triaged → Confirmed
Changed in bzr (Ubuntu):
status: Invalid → Confirmed
tags: added: oem-services
Revision history for this message
Martin Pool (mbp) wrote :

Hi Cody,

Is this causing trouble for OEM services? Can you clarify whether the problem in your case is that the files are root-owned, or if instead it is that they belong to a group of which the user is not a member?

Changed in bzr:
importance: Undecided → Medium
Changed in bzr (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Cody A.W. Somerville (cody-somerville) wrote :

Hi Martin,

 One of our new hires (manager for our PM team) recently installed Ubuntu 10.10. For some, as of yet, undiscovered reason his install has him a member of the 'users' group instead of a per-user group (almost as if USERGROUPS was set to no in /etc/adduser.conf). Whats even more odd is that his per-user group does exist - he just isn't a member of it. His home directory and a number of files + folders underneath of it are owned by '$USER:$USER' but most are owned by '$USER:users'. New files he creates are owned by '$USER:users' thus the reason the chown failed.

 I've spoken with Colin Watson about this and he can't think of any reason to explain this. However, there is clearly some codepath that results in this situation since the original reporter of this bug appears to be in the exact same situation.

 For bzr, is the chown necessary? I'm guessing its to prevent the files being owned by, for example, root if the first invocation of bzr is done via sudo or something? Maybe just silencing the error is appropriate to close out this bug (since clearly the user group stuff isn't a bzr problem) - ie. (assuming my guess was correct), accept the chown as a best effort attempt to provide smoother experience?

Changed in bzr (Ubuntu):
status: Confirmed → Fix Committed
Vincent Ladeuil (vila)
Changed in bzr (Ubuntu):
status: Fix Committed → Confirmed
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.