{"thread":{"id":"25261","subject":"A sudden lack of permission","startedAt":"2010-09-27T14:52:52Z","lastAt":"2010-09-27T16:30:32Z","messageCount":5,"participants":["Ivan Uemlianin","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"151827","messageId":"4CA0AFC4.1060001@llaisdy.com","threadId":"25261","inReplyTo":null,"subject":"A sudden lack of permission","fromName":"Ivan Uemlianin","fromEmail":"ivan@llaisdy.com","sentAt":"2010-09-27T14:52:52Z","receivedAt":"2010-09-27T14:52:52Z","isPatch":false,"sender":{"key":"ivan@llaisdy.com","avatar":null},"body":"  Dear All\n\nI have been using git quite happily for a good while, pushing to my \nremote.  Suddenly this afternoon the remote told me I didn't have \npermission:\n\n     $ git push\n     ivan@remote.org's password:\n     Counting objects: 19, done.\n     Delta compression using up to 2 threads.\n     Compressing objects: 100% (11/11), done.\n     Writing objects: 100% (11/11), 1.04 KiB, done.\n     Total 11 (delta 8), reused 0 (delta 0)\n     error: insufficient permission for adding an object to repository \ndatabase ./objects\n\n     fatal: failed to write object\n     error: unpack failed: unpack-objects abnormal exit\n     To ivan@remote.org:/var/www/git/my_repos.git\n      ! [remote rejected] master -> master (n/a (unpacker error))\n     error: failed to push some refs to \n'ivan@remote.org:/var/www/git/my_repos.git'\n\nI had sufficient permission even this morning!\n\nPlease could someone tell me what might have happened and, more \nimportantly, how I can start pushing to the remote again?  The project \nin my_repos is large, so I'd rather not start a new repos from scratch.\n\nWith thanks and best wishes\n\nIvan\n\n-- \n============================================================\nIvan A. Uemlianin\nSpeech Technology Research and Development\n\n                     ivan@llaisdy.com\n                      www.llaisdy.com\n                          llaisdy.wordpress.com\n                      www.linkedin.com/in/ivanuemlianin\n\n     \"Froh, froh! Wie seine Sonnen, seine Sonnen fliegen\"\n                      (Schiller, Beethoven)\n============================================================\n"},{"id":"151835","messageId":"20100927160759.GB10256@sigill.intra.peff.net","threadId":"25261","inReplyTo":"4CA0AFC4.1060001@llaisdy.com","subject":"Re: A sudden lack of permission","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-09-27T16:07:59Z","receivedAt":"2010-09-27T16:07:59Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Sep 27, 2010 at 03:52:52PM +0100, Ivan Uemlianin wrote:\n\n> I have been using git quite happily for a good while, pushing to my\n> remote.  Suddenly this afternoon the remote told me I didn't have\n> permission:\n> \n>     $ git push\n>     ivan@remote.org's password:\n>     Counting objects: 19, done.\n>     Delta compression using up to 2 threads.\n>     Compressing objects: 100% (11/11), done.\n>     Writing objects: 100% (11/11), 1.04 KiB, done.\n>     Total 11 (delta 8), reused 0 (delta 0)\n>     error: insufficient permission for adding an object to repository\n> database ./objects\n> \n>     fatal: failed to write object\n>     error: unpack failed: unpack-objects abnormal exit\n>     To ivan@remote.org:/var/www/git/my_repos.git\n>      ! [remote rejected] master -> master (n/a (unpacker error))\n>     error: failed to push some refs to\n> 'ivan@remote.org:/var/www/git/my_repos.git'\n> \n> I had sufficient permission even this morning!\n> \n> Please could someone tell me what might have happened and, more\n> importantly, how I can start pushing to the remote again?  The\n> project in my_repos is large, so I'd rather not start a new repos\n> from scratch.\n\nPresumably the permissions on the server changed for some reason. Can\nyou ssh to the remote host and confirm that user \"ivan\" has permissions\nto write to the repo's objects dir? If not, then you will have to figure\nout what happened, but it is likely outside the scope of git (e.g., an\noverly inclusive chmod by some cron job or admin on the box).\n\nIf you do have permissions, then we will have to dig deeper into why git\nwould fail, but the permissions would appear fine.\n\n-Peff\n"},{"id":"151837","messageId":"4CA0C36B.5000708@llaisdy.com","threadId":"25261","inReplyTo":"20100927160759.GB10256@sigill.intra.peff.net","subject":"Re: A sudden lack of permission","fromName":"Ivan Uemlianin","fromEmail":"ivan@llaisdy.com","sentAt":"2010-09-27T16:16:43Z","receivedAt":"2010-09-27T16:16:43Z","isPatch":false,"sender":{"key":"ivan@llaisdy.com","avatar":null},"body":"  Dear Peff\n\nThanks for your help.\n\nYes, I can ssh onto the server, cd to /var/www/git/my_repos.git and add, \nedit files, etc.\n\nThere is another person on the box doing sysadmin.  I'll ask.\n\nIs there any reason the repos could have just broken somehow?  A corrupt \npush?\n\nBest wishes\n\nIvan\n\n\n\nOn 27/09/2010 17:07, Jeff King wrote:\n> On Mon, Sep 27, 2010 at 03:52:52PM +0100, Ivan Uemlianin wrote:\n>\n>> I have been using git quite happily for a good while, pushing to my\n>> remote.  Suddenly this afternoon the remote told me I didn't have\n>> permission:\n>>\n>>      $ git push\n>>      ivan@remote.org's password:\n>>      Counting objects: 19, done.\n>>      Delta compression using up to 2 threads.\n>>      Compressing objects: 100% (11/11), done.\n>>      Writing objects: 100% (11/11), 1.04 KiB, done.\n>>      Total 11 (delta 8), reused 0 (delta 0)\n>>      error: insufficient permission for adding an object to repository\n>> database ./objects\n>>\n>>      fatal: failed to write object\n>>      error: unpack failed: unpack-objects abnormal exit\n>>      To ivan@remote.org:/var/www/git/my_repos.git\n>>       ! [remote rejected] master ->  master (n/a (unpacker error))\n>>      error: failed to push some refs to\n>> 'ivan@remote.org:/var/www/git/my_repos.git'\n>>\n>> I had sufficient permission even this morning!\n>>\n>> Please could someone tell me what might have happened and, more\n>> importantly, how I can start pushing to the remote again?  The\n>> project in my_repos is large, so I'd rather not start a new repos\n>> from scratch.\n> Presumably the permissions on the server changed for some reason. Can\n> you ssh to the remote host and confirm that user \"ivan\" has permissions\n> to write to the repo's objects dir? If not, then you will have to figure\n> out what happened, but it is likely outside the scope of git (e.g., an\n> overly inclusive chmod by some cron job or admin on the box).\n>\n> If you do have permissions, then we will have to dig deeper into why git\n> would fail, but the permissions would appear fine.\n>\n> -Peff\n\n\n-- \n============================================================\nIvan A. Uemlianin\nSpeech Technology Research and Development\n\n                     ivan@llaisdy.com\n                      www.llaisdy.com\n                          llaisdy.wordpress.com\n                      www.linkedin.com/in/ivanuemlianin\n\n     \"Froh, froh! Wie seine Sonnen, seine Sonnen fliegen\"\n                      (Schiller, Beethoven)\n============================================================\n"},{"id":"151838","messageId":"20100927162235.GA10575@sigill.intra.peff.net","threadId":"25261","inReplyTo":"4CA0C36B.5000708@llaisdy.com","subject":"Re: A sudden lack of permission","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-09-27T16:22:36Z","receivedAt":"2010-09-27T16:22:36Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Sep 27, 2010 at 05:16:43PM +0100, Ivan Uemlianin wrote:\n\n> Thanks for your help.\n> \n> Yes, I can ssh onto the server, cd to /var/www/git/my_repos.git and\n> add, edit files, etc.\n\nDid you check specifically the /var/www/git/my_repos.git/objects\ndirectory?\n\n> Is there any reason the repos could have just broken somehow?  A\n> corrupt push?\n\nI can't imagine a corrupt push would do it. Git shouldn't be changing\nthe permissions on the objects directory at all.\n\n-Peff\n"},{"id":"151841","messageId":"4CA0C6A8.8050304@llaisdy.com","threadId":"25261","inReplyTo":"20100927162235.GA10575@sigill.intra.peff.net","subject":"Re: A sudden lack of permission","fromName":"Ivan Uemlianin","fromEmail":"ivan@llaisdy.com","sentAt":"2010-09-27T16:30:32Z","receivedAt":"2010-09-27T16:30:32Z","isPatch":false,"sender":{"key":"ivan@llaisdy.com","avatar":null},"body":"  On 27/09/2010 17:22, Jeff King wrote:\n> On Mon, Sep 27, 2010 at 05:16:43PM +0100, Ivan Uemlianin wrote:\n>\n>> Yes, I can ssh onto the server, cd to /var/www/git/my_repos.git and\n>> add, edit files, etc.\n> Did you check specifically the /var/www/git/my_repos.git/objects\n> directory?\n\nI can add files to the objects directory, but files in subdirectories \n(eg ff/, info/, pack/) are read only.\n\nI have tried pushing to other reposes on the same server and some I can \npush to some I can't.  Ones I /can/ push to, their objects/ff/ etc \ndirectories are read only.\n\nI'm using git a lot, but as (a) it generally just works and (b) I'm \ndoing very basic things (pull, push, add, commit, status), I know very \nlittle about what is really going on.\n\nBest wishes\n\nIvan\n\n\n-- \n============================================================\nIvan A. Uemlianin\nSpeech Technology Research and Development\n\n                     ivan@llaisdy.com\n                      www.llaisdy.com\n                          llaisdy.wordpress.com\n                      www.linkedin.com/in/ivanuemlianin\n\n     \"Froh, froh! Wie seine Sonnen, seine Sonnen fliegen\"\n                      (Schiller, Beethoven)\n============================================================\n"}]}