git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: github@online.ms
Cc: git@vger.kernel.org
Subject: Re: Aw: Re: linux git init/clone on Netapp NTFS security style volumes
Date: Mon, 8 Jul 2024 21:46:42 +0000	[thread overview]
Message-ID: <ZoxeQgi3RWIHUPya@tapette.crustytoothpaste.net> (raw)
In-Reply-To: <trinity-3d633a4a-10c6-444e-9e5c-79330941ddb6-1720457458565@3c-app-webde-bap34>

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

On 2024-07-08 at 16:50:58, github@online.ms wrote:
> The feature is very specific to Netapp. The (Netapp) volume is mounted using NFSv4, but chmod operations are not allowed as permissions have to be managed using Windows.
> Currently, OS is ubuntu 22.04. I'm confident that the distribution does not make a difference.

Okay, then I think the answer is that your NFS server is considered to
be broken, and there are a variety of NFS breakages that violate POSIX
that we don't work around, including the very common one where
open(file, O_RDWR, 0444) doesn't work.

I will tell you that this configuration will break a lot of other tools,
not just Git.  Git LFS and its testsuite will be broken; the Perl,
Python, and Ruby testsuites will also be broken; and there's various
other software I know of that simply will not work on such a file system
(and a simple search turns up yet more). chmod is a really fundamental
piece of Unix functionality, and even if you patch this in Git, you're
going to see a bunch of breakage and most upstreams and distros won't
care.

> Following section of the code should be skipped for given case.
> https://github.com/git/git/blob/master/config.c#L3434-L3438
> 
> 		if (chmod(get_lock_file_path(&lock), st.st_mode & 07777) < 0) {
> 			error_errno(_("chmod on %s failed"), get_lock_file_path(&lock));
> 			ret = CONFIG_NO_WRITE;
> 			goto out_free;
> 		}
> 
> I'm looking for some advice how to best skip or catch this section.

We have core.filemode, but according to the documentation, that only
takes into consideration the executable bit.  So I suppose you could add
a third option, "none" (or "broken"), that is the equivalent of false
but also means that chmod is broken altogether and shouldn't be used.
The documentation would need to be updated as well.

Someone else might prefer a different option for this altogether, but
you may not get that feedback until you send a patch.

> In addition, I came across this Netapp setting which might just ignore the chmod operations without Client side failure. I haven't tested it yet.
> https://kb.netapp.com/on-prem/ontap/da/NAS/NAS-KBs/Can_I_set_UNIX_style_permissions_from_an_NFS_mount_on_an_NTFS_qtree

That might be also be a viable approach.  I don't see an option to
disable this functionality in the Linux NFS client, which is where I
would have looked.
-- 
brian m. carlson (they/them or he/him)
Toronto, Ontario, CA

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

      reply	other threads:[~2024-07-08 21:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-06 19:35 linux git init/clone on Netapp NTFS security style volumes github
2024-07-07 19:54 ` brian m. carlson
2024-07-08 16:50   ` Aw: " github
2024-07-08 21:46     ` 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=ZoxeQgi3RWIHUPya@tapette.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=git@vger.kernel.org \
    --cc=github@online.ms \
    /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;
as well as URLs for NNTP newsgroup(s).