From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Auriane Reverdell <areverdell@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git not allowing 744 as permissions for a file
Date: Tue, 24 Jan 2023 22:04:30 +0000 [thread overview]
Message-ID: <Y9BV7kpHJsORRDiq@tapette.crustytoothpaste.net> (raw)
In-Reply-To: <CAFC92SFZgQtstEzV5pgT_tPSs=6fRJ=rE6ad_DENnn_UoobxFQ@mail.gmail.com>
[-- 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 --]
prev parent reply other threads:[~2023-01-24 22:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y9BV7kpHJsORRDiq@tapette.crustytoothpaste.net \
--to=sandals@crustytoothpaste.net \
--cc=areverdell@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox