git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Smart HTTP push permissions failure

From
DMDavid McGough <dmcgough@opentext.com>
Date
Aug 23, 2016, 15:45 UTC
Message-ID
<89CBBBEBEE33F5469A9FA456B5F70625CCDB9BEB@otwlxg20.opentext.net>
Hi Git Community!

I'm trying to get Git on the server. I installed Git and httpd on Centos 7 and configred for smart http. I created a project on my local git and I cloned it to a base repository: git clone --bare DataConversion DataConversion.git then I scp it to the server: scp -r DataConversion git@xx.xx.xx.xx:/opt/git/repository/product/tools. Then on the server for the project I ran git config core.sharedRepository group

I added a remote server to my local project: git remote add origin http://xx.xx.xx.xx/git/product/tools/DataConversion.git

git remote -v shows: origin http://xx.xx.xx.xx/git/product/tools/DataConversion.git (fetch) origin http://xx.xx.xx.xx/git/product/tools/DataConversion.git (push)

When I try to push to the server I get this message: remote: error: insufficient permission for adding an object to repository database ./objects remote: fatal: failed to write object

Fwiw I can clone the project from the server to my local.
Here are the permssions on the project and the objects folder.

[git@services-git DataConversion.git]$ pwd /opt/git/repos/product/tools/DataConversion.git [git@services-git DataConversion.git]$ ll total 24 -rwxrwxr-x. 1 git staff 196 Aug 23 11:24 config -rwxrwxr-x. 1 git staff 73 Aug 22 15:28 description -rwxrwxr-x. 1 git staff 23 Aug 22 15:28 HEAD drwxrwxr-x. 2 git staff 4096 Aug 22 15:28 hooks drwxrwxr-x. 2 git staff 20 Aug 22 15:28 info drwxrwxr-x. 65 git staff 4096 Aug 22 16:50 objects -rwxrwxr-x. 1 git staff 98 Aug 22 15:29 packed-refs drwxrwxr-x. 4 git staff 29 Aug 22 15:29 refs [git@services-git DataConversion.git]$ [git@services-git DataConversion.git]$ cd objects [git@services-git objects]$ ll total 12 drwxrwxr-x. 2 git staff 51 Aug 22 15:28 06 drwxrwxr-x. 2 git staff 51 Aug 22 15:28 08 drwxrwxr-x. 2 git staff 96 Aug 22 15:28 0a drwxrwxr-x. 2 git staff 51 Aug 22 15:28 17 drwxrwxr-x. 2 git staff 51 Aug 22 15:28 19 drwxrwxr-x. 2 git staff 51 Aug 22 15:28 1c drwxrwxr-x. 2 git staff 51 Aug 22 15:28 24 drwxrwxr-x. 2 git staff 51 Aug 22 15:28 29 drwxrwxr-x. 2 git staff 4096 Aug 22 15:28 30 drwxrwxr-x. 2 git staff 51 Aug 22 15:28 32 drwxrwxr-x. 2 git staff 51 Aug 22 15:28 33 drwxrwxr-x. 2 git staff 51 Aug 22 15:28 3d drwxrwxr-x. 2 git staff 51 Aug 22 15:28 3f drwxrwxr-x. 2 git staff 51 Aug 22 15:28 41 drwxrwxr-x. 2 git staff 51 Aug 22 15:28 4b drwxrwxr-x. 2 git staff 51 Aug 22 15:28 57 drwxrwxr-x. 2 git staff 51 Aug 22 15:28 5a drwxrwxr-x. 2 git staff 51 Aug 22 15:28 5d drwxrwxr-x. 2 git staff 51 Aug 22 15:28 5f drwxrwxr-x. 2 git staff 51 Aug 22 15:28 64 drwxrwxr-x. 2 git staff 51 Aug 22 15:28 65 drwxrwxr-x. 2 git staff 4096 Aug 22 15:28 69 drwxrwxr-x. 2 git staff 51 Aug 22 15:28 6d drwxrwxr-x. 2 git staff 51 Aug 22 15:28 70 drwxrwxr-x. 2 git staff 51 Aug 22 15:28 74 drwxrwxr-x. 2 git staff 51 Aug 22 15:28 7a drwxrwxr-x. 2 git staff 51 Aug 22 15:28 7b drwxrwxr-x. 2 git staff 51 Aug 22 15:28 7c drwxrwxr-x. 2 git staff 51 Aug 22 15:28 84 drwxrwxr-x. 2 git staff 51 Aug 22 15:28 89 drwxrwxr-x. 2 git staff 51 Aug 22 15:28 8a drwxrwxr-x. 2 git staff 51 Aug 22 15:28 8c drwxrwxr-x. 2 git staff 51 Aug 22 15:28 93 drwxrwxr-x. 2 git staff 51 Aug 22 15:28 9d drwxrwxr-x. 2 git staff 51 Aug 22 15:28 a0 drwxrwxr-x. 2 git staff 51 Aug 22 15:28 a2 drwxrwxr-x. 2 git staff 4096 Aug 22 15:28 a3 drwxrwxr-x. 2 git staff 51 Aug 22 15:28 a6 drwxrwxr-x. 2 git staff 51 Aug 22 15:28 ab drwxrwxr-x. 2 git staff 51 Aug 22 15:28 af drwxrwxr-x. 2 git staff 51 Aug 22 15:28 b1 drwxrwxr-x. 2 git staff 51 Aug 22 15:28 b7 drwxrwxr-x. 2 git staff 51 Aug 22 15:28 b8 drwxrwxr-x. 2 git staff 51 Aug 22 15:28 c3 drwxrwxr-x. 2 git staff 51 Aug 22 15:28 c8 drwxrwxr-x. 2 git staff 96 Aug 22 15:28 c9 drwxrwxr-x. 2 git staff 51 Aug 22 15:28 cb drwxrwxr-x. 2 git staff 51 Aug 22 15:28 cf drwxrwxr-x. 2 git staff 51 Aug 22 15:29 d1 drwxrwxr-x. 2 git staff 51 Aug 22 15:29 d8 drwxrwxr-x. 2 git staff 51 Aug 22 15:29 d9 drwxrwxr-x. 2 git staff 51 Aug 22 15:29 db drwxrwxr-x. 2 git staff 51 Aug 22 15:29 dc drwxrwxr-x. 2 git staff 51 Aug 22 15:29 e1 drwxrwxr-x. 2 git staff 51 Aug 22 15:29 e7 drwxrwxr-x. 2 git staff 51 Aug 22 15:29 e9 drwxrwxr-x. 2 git staff 51 Aug 22 15:29 ea drwxrwxr-x. 2 git staff 51 Aug 22 15:29 ed drwxrwxr-x. 2 git staff 51 Aug 22 15:29 f0 drwxrwxr-x. 2 git staff 51 Aug 22 15:29 f3 drwxrwxr-x. 2 git staff 51 Aug 22 15:29 f5 drwxrwxr-x. 2 git staff 6 Aug 22 15:29 info drwxrwxr-x. 2 git staff 6 Aug 22 15:29 pack

apache and git users are both in the staff group, and staff group is their default group.  I have also tried to use the set group id bit but to no avail. http://www.gnu.org/software/coreutils/manual/html_node/Directory-Setuid-and-Setgid.html

[root@services-git DataConversion.git]# groups apache apache : staff git [root@services-git DataConversion.git]# groups git git : staff apache

So I am pretty confused about what the issue.  Which OS user is git using to write the files?  I hope somebody can help me understand why the project cannot be pushed to the git server.  

Thanks, Dave

  
Next: Jeff King
Message 1 of 3 in “Smart HTTP push permissions failure”
  1. David McGoughAug 23, 2016
  2. Jeff KingAug 24, 2016
  3. David McGoughAug 25, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.