After upgrading my machine to Ubuntu 16.04, I noticed that 'git clone'
started creating files with wrong mode (0700 instead of 0644
typically) on NFSv4 partitions mounted from our NetApp servers.
I've first tracked this down to the fact that git uses
open(name, O_RDWR|O_CREAT|O_EXCL, 0666);
to create files. If O_EXCL is not present, the files are created
normally.
I've tried various kernels from Ubuntu and the problems appeared
between their 4.2.0-42-generic kernel-image (as found on willy) and
the 4.4.0 kernels found on xenial. I tried building 4.9 from
kernel.org and the problem is also there.
I've then bisected the kernel to figure out that this is caused by the
following commit:
After upgrading my machine to Ubuntu 16.04, I noticed that 'git clone'
started creating files with wrong mode (0700 instead of 0644
typically) on NFSv4 partitions mounted from our NetApp servers.
I've first tracked this down to the fact that git uses
open(name, O_RDWR| O_CREAT| O_EXCL, 0666);
to create files. If O_EXCL is not present, the files are created
normally.
I've tried various kernels from Ubuntu and the problems appeared
between their 4.2.0-42-generic kernel-image (as found on willy) and
the 4.4.0 kernels found on xenial. I tried building 4.9 from
kernel.org and the problem is also there.
I've then bisected the kernel to figure out that this is caused by the
following commit:
https:/ /git.kernel. org/cgit/ linux/kernel/ git/torvalds/ linux.git/ commit/ ?id=5334c 9729beccb46fe88 eda9e7
+5bdac926c5f8d8
ie NFS: Send attributes in OPEN request for NFS4_CREATE_ EXCLUSIVE4_ 1
Our NetApp filers are running:
NetApp Release 8.2.3P3 7-Mode: Tue Apr 28 14:48:22 PDT 2015