'bzr init' and 'bzr init-repo' under sudo create files/folder as owned by root

Bug #524306 reported by Parth Malwankar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Wishlist
Unassigned

Bug Description

Based on bug #376388 and discussion on merge proposal:
https://code.launchpad.net/~parthm/bzr/2.0_376388_dot_bazaar_ownership/+merge/19593

sandbox@parthm-laptop:~/tmp$ sudo bzr init foobar
[sudo] password for sandbox:
Created a standalone tree (format: 2a)
sandbox@parthm-laptop:~/tmp$ ls -la foobar
total 12
drwxr-xr-x 3 root root 4096 2010-02-19 15:01 .
drwxr-xr-x 3 sandbox sandbox 4096 2010-02-19 15:01 ..
drwxr-xr-x 6 root root 4096 2010-02-19 15:01 .bzr
sandbox@parthm-laptop:~/tmp$ ls -la
total 12
drwxr-xr-x 3 sandbox sandbox 4096 2010-02-19 15:01 .
drwxr-xr-x 4 sandbox sandbox 4096 2010-02-19 15:01 ..
drwxr-xr-x 3 root root 4096 2010-02-19 15:01 foobar
sandbox@parthm-laptop:~/tmp$ sudo bzr init-repo xyz
Shared repository with trees (format: 2a)
Location:
  shared repository: xyz
sandbox@parthm-laptop:~/tmp$ ls -la
total 16
drwxr-xr-x 4 sandbox sandbox 4096 2010-02-19 15:02 .
drwxr-xr-x 4 sandbox sandbox 4096 2010-02-19 15:01 ..
drwxr-xr-x 3 root root 4096 2010-02-19 15:01 foobar
drwxr-xr-x 3 root root 4096 2010-02-19 15:02 xyz
sandbox@parthm-laptop:~/tmp$ ls -la xyz
total 12
drwxr-xr-x 3 root root 4096 2010-02-19 15:02 .
drwxr-xr-x 4 sandbox sandbox 4096 2010-02-19 15:02 ..
drwxr-xr-x 4 root root 4096 2010-02-19 15:02 .bzr
sandbox@parthm-laptop:~/tmp$

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 524306] [NEW] 'bzr init' and 'bzr init-repo' under sudo create files/folder as owned by root

That to me is a reasonable default, but arguably there should be
options to set the user/group/mode.

Revision history for this message
Parth Malwankar (parthm) wrote :

Agreed. There is probably be a global option across commands that controls the ownership of all files/dirs created by that bazaar commands. That will also take away the magic, which would be a good thing in my opinion.

Martin Pool (mbp)
Changed in bzr:
importance: Undecided → Wishlist
status: New → 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.