Re: git not allowing 744 as permissions for a file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux