Failures creating temporary directories are swallowed.

Bug #237140 reported by muszek
2
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Aaron Bentley

Bug Description

Long story long... I have two repos: local and remote. Local is binded to a remote one. My username is muszek (on both machines). Remote files originally belonged to user tomekg, but following james_w's advice, I did the following (substitute "newgroup" for "hotel"):

<james_w> muszek_: groupadd "newgroup"
<james_w> adduser muszek newgroup
<james_w> adduser tomekg newgroup
<james_w> chown tomekg:newgroup -R branch
<james_w> chmod g+w -R .bzr
added by me: chmod -R g+w *
<james_w> find .bzr -type d -exec chmod g+s '{}' \;

... so everything belongs to tomekg:hotels (and so are muszek and tomekg).

I added/modified/deleted some files locally and did a bzr commit. It went fine.

I logged on the remote machine and did bzr update. Tried several time, deleted webroot/css/reset-fonts-grids.css somewhere between those operations visible in logs (so that the error is slightly different).

I spent ~2 hours with bueno and james_w - we tried many things, nothing has helped.

Output of bzr update -Derror will be attached to the second post...

Finally I did su tomekg later on and the update went fine.

All in one sentence: I have proper permissions. I can successfully operate on files and dirs manually. But when I run bzr update, it refuses to delete them (permission denied).

Revision history for this message
muszek (muszek) wrote :
Revision history for this message
muszek (muszek) wrote :

note: webroot/css/reset-fonts-grids.css was manually deleted and then re-uploaded again

Revision history for this message
muszek (muszek) wrote :

I removed anothere file locally, commited and did bzr update on a remote machine - it went fine. So I can't even reproduce it anymore. Feel free to bury this report in X-files archive.

Revision history for this message
Aaron Bentley (abentley) wrote :

The underlying cause is that errors when creating the TreeTransform temporary directories are swallowed. Later attempts to add files to these directories cause permission denied.

Changed in bzr:
assignee: nobody → abentley
importance: Undecided → Medium
Revision history for this message
John A Meinel (jameinel) wrote :

Changing the permissions of files in .bzr/* would not have affected this. The problem is that you have a file in the working tree with the wrong permissions.

I would argue that there is still a bug that we don't give a better error to help users track down what is wrong.

Revision history for this message
Aaron Bentley (abentley) wrote : Re: [Bug 237140] Re: bzr dies when trying to delete a file that doesn't belong to the user, but is deletable (user and file belong to a group, file has group write permission)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John A Meinel wrote:
> Changing the permissions of files in .bzr/* would not have affected
> this. The problem is that you have a file in the working tree with the
> wrong permissions.
>
> I would argue that there is still a bug that we don't give a better
> error to help users track down what is wrong.

It's a nice idea, but Python doesn't help here very much. OSErrors tend
to be unexpected errors, and they don't contain the relevant arguments.

It would at least help to have known of the original problem, rather
than its consequence.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIRZO/0F+nu1YWqI0RAiDnAJsHt0Wn3qx888vVOyV8pO6d+F94PQCbB4Mz
cOUAsZy1kIGry470FCIKZmo=
=mEII
-----END PGP SIGNATURE-----

Revision history for this message
John A Meinel (jameinel) wrote :

Is there any update to the status of this bug?

Changed in bzr:
status: New → Triaged
Martin Pool (mbp)
Changed in bzr:
status: Triaged → Confirmed
Jelmer Vernooij (jelmer)
tags: added: treetransform
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.