MasterHuang
MasterHuang

Reputation: 13

In reviewboard add local repository error "Permission denied accessing the local Git repository ......"

I need help now!

Environment:Centos 6.7 + reviewboard 2.5.1.1

Now I have installed reviewboard in /var/www/reviewboard,the website user and group is apache:apache,

in the web page,I fill in like this:

Hosting service:custom

Repository Type:Git

Path:/home/jxd/Git/monitor/.git

Mirror Path: [email protected]:company/monitor

current user:jxd

project :monitor

Then I try to save these configuration,but web page says “Permission denied accessing the local Git repository '/home/jxd/Git/monitor/.git'”

and I have tried to execute following command:

chown o+w /home/jxd/Git/monitor/.git

but it doesn't work.

So,please tell me where is wrong ?

Thanks.

Upvotes: 1

Views: 1287

Answers (2)

jeffcook2150
jeffcook2150

Reputation: 4216

Let me add another answer here. ReviewBoard gives a permission denied error when working with treeless repos. It seems to require a full checkout before it will work.

If you have just the .git directory, make a clone from it and point ReviewBoard there.

Upvotes: 0

user3159253
user3159253

Reputation: 17455

Well, just my guesses, which are too long to be a comment but not a complete answer:

  1. check under which accound your HTTP server works. I guess in Centos6 it would be something like apache for apache web server, nginx for nginx server etc.
  2. You've placed your repository into user's HOME folder. Likely, the web-server user from the p.1 doesn't have access to the whole user folder (/home/jxd), no matter what permisssions are set for a subdirectory inside that folder.
  3. Usually shared resources should be placed into a "common folders", like /srv/www or /var/www, /var/lib/www... In any case make sure that the web-server user has appropriate rights for accessing the repo (reading and maybe writing).
  4. You may find useful to create a new group designated for the users of the particular repo (all users, including web-server user) and create a "shared" repo (use git init --shared=group with subsequent chown -R :<designated_group> /path/to/repo.git)

Upvotes: 0

Related Questions