{"thread":{"id":"59147","subject":"git not allowing 744 as permissions for a file","startedAt":"2023-01-24T15:48:43Z","lastAt":"2023-01-24T22:05:06Z","messageCount":2,"participants":["Auriane Reverdell","brian m. carlson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"470986","messageId":"CAFC92SFZgQtstEzV5pgT_tPSs=6fRJ=rE6ad_DENnn_UoobxFQ@mail.gmail.com","threadId":"59147","inReplyTo":null,"subject":"git not allowing 744 as permissions for a file","fromName":"Auriane Reverdell","fromEmail":"areverdell@gmail.com","sentAt":"2023-01-24T15:48:36Z","receivedAt":"2023-01-24T15:48:43Z","isPatch":false,"sender":{"key":"areverdell@gmail.com","avatar":null},"body":"Hi,\n\ngit doesn't allow to add the execution permission on a file only for\nthe user. A chmod 744 on a file will transform into 755 when added to\ngit. This can potentially lead to security problems on certain\nsystems. Is there a way to fix that? I'll be happy to do so if\nsomebody shows me where to do it.\n\nAuriane R.\n"},{"id":"471002","messageId":"Y9BV7kpHJsORRDiq@tapette.crustytoothpaste.net","threadId":"59147","inReplyTo":"CAFC92SFZgQtstEzV5pgT_tPSs=6fRJ=rE6ad_DENnn_UoobxFQ@mail.gmail.com","subject":"Re: git not allowing 744 as permissions for a file","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2023-01-24T22:04:30Z","receivedAt":"2023-01-24T22:05:06Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2023-01-24 at 15:48:36, Auriane Reverdell wrote:\n> Hi,\n> \n> git doesn't allow to add the execution permission on a file only for\n> the user. A chmod 744 on a file will transform into 755 when added to\n> git. This can potentially lead to security problems on certain\n> systems. Is there a way to fix that? I'll be happy to do so if\n> somebody shows me where to do it.\n\nNo, there isn't.  Git tracks only whether the executable bit is set.\nAll file modes are either 644 or 755.\n\nIf you need the permissions or ownership on the file to be different,\nyou can do that by using a script to copy the files into another\nlocation with the proper permissions or ownership instead of using the\ncopies in the repository.  For example, I do this with my dotfiles such\nthat the files have the correct permissions.\n-- \nbrian m. carlson (he/him or they/them)\nToronto, Ontario, CA\n"}]}