access control in bazaar
Daniel Plappert
plappert at denkformat.de
Fri May 6 14:18:01 UTC 2011
Hi John,
thanks for your answer.
> If you want to say: "I have $PROJECT which has several in-progress
> branches. I want user to be able to upload changes to a subdirectory
> $PROJECT/user1/* but not to upload changes to $PROJECT/trunk".
>
Yes, this is what I want, but I wanted it without adjusting filesystem privileges. But if this is the only way, I can live with it.
> That can be done fairly trivially with just filesystem privileges.
>
> bzr init-repo --no-trees $PROJECT
> mkdir $PROJECT/User1
> mkdir $PROJECT/User2
> bzr init $PROJECT/trunk
> find $PROJECT/.bzr -type d -print0 | xargs -0 chmod 2770 # rwxrws---
> find $PROJECT/.bzr -type f -print0 | xargs -0 chmod 660 # rw-rw----
> find $PROJECT/User1 -type d -print0 | xargs -0 chmod 6750 # rwsr-s--
> find $PROJECT/User2 -type f -print0 | xargs -0 chmod 640 # rw-r----
> find $PROJECT/trunk -type d -print0 | xargs -0 chmod 2750 # rwxr-s--
> ...
>
> chown -R User1.Project $PROJECT/User1
> chown -R User2.Project $PROJECT/User2
> chown -R SuperUser.Project $PROJECT/trunk
>
Thank you very much for this example. It's exactly what I was trying to do.
Best regards,
Daniel
More information about the bazaar
mailing list