{"thread":{"id":"62329","subject":"Git bug report - CNS - Shared repository permissions issues under RedHat 9","startedAt":"2024-10-14T12:07:18Z","lastAt":"2024-10-15T12:18:22Z","messageCount":3,"participants":["Jordi Balcells-Smith","Taylor Blau"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"504986","messageId":"AUXP273MB050333B19CCE93899FE9F26DDB442@AUXP273MB0503.AREP273.PROD.OUTLOOK.COM","threadId":"62329","inReplyTo":null,"subject":"Git bug report - CNS - Shared repository permissions issues under RedHat 9","fromName":"Jordi Balcells-Smith","fromEmail":"jsmith@cnsonline.net","sentAt":"2024-10-14T12:07:07Z","receivedAt":"2024-10-14T12:07:18Z","isPatch":false,"sender":{"key":"jsmith@cnsonline.net","avatar":null},"body":"Hello Git,\n\nPlease, consider our bug report. Thank-you\n\n\n\n\nThank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\n\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\n\nWe upgraded the operating system from RedHat Enterprise Linux 7 to 9. This upgrade pulled the version of Git from 1.8.3.1 to 2.43.5.\n\nWhat did you expect to happen? (Expected behavior)\n\nWe expected to be able to continue using git in our shared repository normally.\n\nWhat happened instead? (Actual behavior)\n\nSince the upgrade, any clone attempt ends with\n\n***\n\nc:\\tmp\\gittest>git clone ssh://10.150.80.53/data/git/cns/repo-parent/repo.git\nCloning into 'repo'...\nfatal: detected dubious ownership in repository at '/data/git/cns/repo-parent/repo.git'\nTo add an exception for this directory, call:\n\n        git config --global --add safe.directory /data/git/cns/repo-parent/repo.git\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists\n\n***\n\nEvery repository we serve is already configured with the shareRepository directive set to true. This used to work fine before the OS upgrade:\n\n[core]\n  repositoryformatversion = 0\n  filemode = true\n  bare = true\n  sharedRepository = true\n\nAdding the safe.directory setting on a client basis does not make any difference, as the problem lies solely on the Git server.\n\nThe UNIX modes and ownership use the common setup with setgid (2770 permissions). Every user belongs to the group and is allowed to read and write with no exceptions. The effective permissions have been checked locally and via SSH and they work as expected. The system uses Centrify as the Microsoft Active Directory Domain Services client implementation, which was also upgraded alongside the operating system, but given the fact that the effective permissions work fine after the OS upgrade we came to the conclusion that, apparently, Git might be involved.\n\nWhat's different between what you expected and what actually happened?\n\nThe inability to interact with Git as you can see in the error.\n\nAnything else you want to add:\n\nWe think that we might be missing an additional configuration directive as required by the Git upgrade, but are unsure about it.\n\nPlease enquire for any additional information you might need.\n\nThank-you very much for your attention.\n\n\n\nPlease review the rest of the bug report below.\nYou can delete any lines you don't wish to share.\n\n[System Info]\ngit version:\ngit version 2.43.5\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nuname: Linux 5.14.0-427.33.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 16 10:56:24 EDT 2024 x86_64\ncompiler info: gnuc: 11.4\nlibc info: glibc: 2.34\n$SHELL (typically, interactive shell): /bin/bash\n\n\n[Enabled Hooks]\nnot run from a git repository - no hooks to show\n"},{"id":"505102","messageId":"Zw24GJnLlqTuCOsM@nand.local","threadId":"62329","inReplyTo":"AUXP273MB050333B19CCE93899FE9F26DDB442@AUXP273MB0503.AREP273.PROD.OUTLOOK.COM","subject":"Re: Git bug report - CNS - Shared repository permissions issues under RedHat 9","fromName":"Taylor Blau","fromEmail":"me@ttaylorr.com","sentAt":"2024-10-15T00:32:24Z","receivedAt":"2024-10-15T00:32:27Z","isPatch":false,"sender":{"key":"me@ttaylorr.com","avatar":"https://avatars.githubusercontent.com/u/301000140?v=4"},"body":"On Mon, Oct 14, 2024 at 12:07:07PM +0000, Jordi Balcells-Smith wrote:\n> We upgraded the operating system from RedHat Enterprise Linux 7 to 9.\n> This upgrade pulled the version of Git from 1.8.3.1 to 2.43.5.\n\nGiven that 1.8.3.1 was tagged sometime in June, 2013, I'd say that is\nquite the jump ;-).\n>\n> c:\\tmp\\gittest>git clone ssh://10.150.80.53/data/git/cns/repo-parent/repo.git\n> Cloning into 'repo'...\n> fatal: detected dubious ownership in repository at '/data/git/cns/repo-parent/repo.git'\n> To add an exception for this directory, call:\n>\n>         git config --global --add safe.directory /data/git/cns/repo-parent/repo.git\n> fatal: Could not read from remote repository.\n>\n> Please make sure you have the correct access rights\n> and the repository exists\n\nThis is intentional. Please see the documentation in git-config(1) on\nsafe.directory for more information about what this check does and how\nto disable it (if you desire).\n\nThanks,\nTaylor\n"},{"id":"505161","messageId":"AUXP273MB0503E37C64D153D4C76A87D2DB452@AUXP273MB0503.AREP273.PROD.OUTLOOK.COM","threadId":"62329","inReplyTo":"Zw24GJnLlqTuCOsM@nand.local","subject":"RE: Git bug report - CNS - Shared repository permissions issues under RedHat 9","fromName":"Jordi Balcells-Smith","fromEmail":"jsmith@cnsonline.net","sentAt":"2024-10-15T12:18:05Z","receivedAt":"2024-10-15T12:18:22Z","isPatch":false,"sender":{"key":"jsmith@cnsonline.net","avatar":null},"body":"Hi Taylor,\n\nThanks for your prompt reply. Apologies for this being a support enquiry rather than bug report.\n\nYeah, it was quite a leap actually! I got confused between the core.sharedRepository and safe.directory settings.\n\nSetting the latter in the server made it. I presume the intent of safe.directory is to have a more granular control in shared repos.\n\nThank-you very much,\n\nJordi Balcells-Smith\nService support specialist - IT operations\nCommunity Network Services\n\n\n\n-----Original Message-----\nFrom: Taylor Blau <me@ttaylorr.com> \nSent: Tuesday, October 15, 2024 1:32 AM\nTo: Jordi Balcells-Smith <Jsmith@cnsonline.net>\nCc: git@vger.kernel.org\nSubject: Re: Git bug report - CNS - Shared repository permissions issues under RedHat 9\n\nOn Mon, Oct 14, 2024 at 12:07:07PM +0000, Jordi Balcells-Smith wrote:\n> We upgraded the operating system from RedHat Enterprise Linux 7 to 9.\n> This upgrade pulled the version of Git from 1.8.3.1 to 2.43.5.\n\nGiven that 1.8.3.1 was tagged sometime in June, 2013, I'd say that is quite the jump ;-).\n>\n> c:\\tmp\\gittest>git clone \n> ssh://10.150.80.53/data/git/cns/repo-parent/repo.git\n> Cloning into 'repo'...\n> fatal: detected dubious ownership in repository at '/data/git/cns/repo-parent/repo.git'\n> To add an exception for this directory, call:\n>\n>         git config --global --add safe.directory \n> /data/git/cns/repo-parent/repo.git\n> fatal: Could not read from remote repository.\n>\n> Please make sure you have the correct access rights and the repository \n> exists\n\nThis is intentional. Please see the documentation in git-config(1) on safe.directory for more information about what this check does and how to disable it (if you desire).\n\nThanks,\nTaylor\n"}]}