All of lore.kernel.org
 help / color / mirror / Atom feed
* git not allowing 744 as permissions for a file
@ 2023-01-24 15:48 Auriane Reverdell
  2023-01-24 22:04 ` brian m. carlson
  0 siblings, 1 reply; 2+ messages in thread
From: Auriane Reverdell @ 2023-01-24 15:48 UTC (permalink / raw)
  To: git

Hi,

git doesn't allow to add the execution permission on a file only for
the user. A chmod 744 on a file will transform into 755 when added to
git. This can potentially lead to security problems on certain
systems. Is there a way to fix that? I'll be happy to do so if
somebody shows me where to do it.

Auriane R.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: git not allowing 744 as permissions for a file
  2023-01-24 15:48 git not allowing 744 as permissions for a file Auriane Reverdell
@ 2023-01-24 22:04 ` brian m. carlson
  0 siblings, 0 replies; 2+ messages in thread
From: brian m. carlson @ 2023-01-24 22:04 UTC (permalink / raw)
  To: Auriane Reverdell; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 886 bytes --]

On 2023-01-24 at 15:48:36, Auriane Reverdell wrote:
> Hi,
> 
> git doesn't allow to add the execution permission on a file only for
> the user. A chmod 744 on a file will transform into 755 when added to
> git. This can potentially lead to security problems on certain
> systems. Is there a way to fix that? I'll be happy to do so if
> somebody shows me where to do it.

No, there isn't.  Git tracks only whether the executable bit is set.
All file modes are either 644 or 755.

If you need the permissions or ownership on the file to be different,
you can do that by using a script to copy the files into another
location with the proper permissions or ownership instead of using the
copies in the repository.  For example, I do this with my dotfiles such
that the files have the correct permissions.
-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-24 22:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-24 15:48 git not allowing 744 as permissions for a file Auriane Reverdell
2023-01-24 22:04 ` brian m. carlson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.