bzr & unix permissions on the .bzr contexts.

John Arbash Meinel john at arbash-meinel.com
Mon Aug 2 20:14:30 BST 2010


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

Michael Andronov wrote:
> Hi,
> 
> I have a question, which probably has been asked already. But I failed
> to find an answer:
> 
> Let assume, there is User1,  who initiated the Project, commit, and
> make a repository;
> Let assume, there is User2,  who would like to contribute/to cooperate
> with User 1.
> Both users are belonging to the same '*unix' group.
> 
> User1 & User 2 can NOT 'see' each other computer directly.  But they
> can  both read/write to  the third computer.
> 
> So, the model they choose:
> 
> User1 <---> Server <--->User2.
> 
> User1 made a push to Server. As result, the {...}/Project/.bzr
> appeared on the server.
> But permission of the above .bzr is
> rwx per user,
> r_x per group
> 
> Assuming that User1 and User2 are within the same group, User 2 can
> 'bzr pull' now from the server, and get the code to work on.
> However, he can not push back his changes, since file permissions are
> not allowed that.
> 
> My understanding is that bzr, -  ( git, and hg too) - does not take
> care about the permissions directly.

If you do:

  find .bzr -type d -print0 | xargs -0 chmod 2770
  chown -R .group .bzr

That should set appropriate permissions for everyone involved.

Directories need to be group rwx so that we can write into them, but
files can be r-x because we don't write to existing files.

We do stat the .bzr directory and try to preserve that permission on
files that we create.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxXGRYACgkQJdeBCYSNAANPxgCgh0+l3BVuGCrch9ptyJYBZbnb
drcAnRSZB7/+hV/jSGltRtDPx5jlu1eV
=kwFL
-----END PGP SIGNATURE-----



More information about the bazaar mailing list