0

user2 wants to bzr push changes to a directory /home/user1/project/dev. user2 has group +rwx permissions on this directory, but not in my home directory /home/user1/

This results in the error:

bzr: ERROR: Permission denied: "h2i9usf1l6ieofpuul87.pack": [Errno 13] Permission denied: '/home/user1/.bzr/repository/upload/h2i9usf1l6ieofpuul87.pack'

It is not clear to me why user2 needs permission to my home /home/user1/.bzr/ when /home/user1/project/dev is branch is from /home/usr1/project/trunk.

I am relatively new to using VCS and am not sure how I got in this predicament. Is there a way to break the dependency on the /home/user1/.bzr, or to create a branch from /home/user1/project/trunk/ that does not have this dependency?

David LeBauer
  • 31,011
  • 31
  • 115
  • 189

3 Answers3

4

It seems you have shared repository in /home/user1/ and branch at /home/user1/project/dev is using that repository. Therefore it needs access to repository to store new revisions.

How to check: run command bzr info and check its output for the definition of that branch. If you will see "Repository tree" or "Repository branch" then that branch definitely using a shared repository. You should see the path to the repository in the output of bzr info.

How to fix: instruct bzr to stop using shared repository by executing command bzr reconfigure --standalone in the branch at /home/user1/project/dev. Check output of bzr info again. Now it should be named "Standalone tree" or "Standalone branch". After that user2 should be able to successfully push to that branch.

bialix
  • 20,053
  • 8
  • 46
  • 63
  • thank you for your answer. This makes sense, but it only changed the error to: `ERROR: Permission denied:'/home/user1/project/dev/.bzr/repository/upload/h2i9usf1l6ieofpuul87.pack'bzr: [Errno 13] Permission denied` I have posted an alternative solution, still waiting to hear if it worked. – David LeBauer Dec 02 '11 at 17:08
1

I think all parent directories should have o+x permissions.

Anonymous
  • 11
  • 1
1

(provided by user3) This might be fixed using following commands (group name is project_dev):

chgrp -R project_dev /home/user1/project/dev
find /home/user1/project/dev -type d -exec chmod g+s {} \;
  1. make all files owned by group cheas_dev,
  2. add the sticky bit to all folders making it that all files/folders created under it will also be owned by group project_dev.
David LeBauer
  • 31,011
  • 31
  • 115
  • 189