Bug 6256

Summary: nfs group permissions don't work right since 2.6.16
Product: File System Reporter: Han Boetes (han)
Component: NFSAssignee: Trond Myklebust (trondmy)
Status: REJECTED INVALID    
Severity: normal    
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.16 Subsystem:
Regression: --- Bisected commit-id:
Attachments: sudo tcpdump -s9000 -c100 -w file -Nt udp port 2049

Description Han Boetes 2006-03-20 13:40:31 UTC
Most recent kernel where this bug did not occur: 2.6.15.6
Distribution: CRUX
Hardware Environment: i386
Software Environment:
Problem Description:

I have a restricted useraccount, member of the nfs group, running something like
this:
    echo "foo" >   /mnt/nfs/nowplaying

To this file:
    ~% l ~/nfs/nowplaying*
    -rw-rw-r-- 1 han nfs 0 mrt 20 21:23 /mnt/nfs/nowplaying

Booting with the previous kernel shows this is a 2.6.16 problem.

dmesg included.

PS: This bug is fully reproducable without the nvidia-module loaded.

ACPI data)
 BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
 BIOS-e820: 00000000fec00000 - 0000000100000000 (reserved)
0MB HIGHMEM available.
1023MB LOWMEM available.
On node 0 totalpages: 262128
  DMA zone: 4096 pages, LIFO batch:0
  DMA32 zone: 0 pages, LIFO batch:0
  Normal zone: 258032 pages, LIFO batch:31
  HighMem zone: 0 pages, LIFO batch:0
DMI 2.3 present.
ACPI: RSDP (v000 Nvidia                                ) @ 0x000f76f0
ACPI: RSDT (v001 Nvidia AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x3fff3040
ACPI: FADT (v001 Nvidia AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x3fff30c0
ACPI: SSDT (v001 PTLTD  POWERNOW 0x00000001  LTP 0x00000001) @ 0x3fff9500
ACPI: SRAT (v001 AMD    HAMMER   0x00000001 AMD  0x00000001) @ 0x3fff9640
ACPI: MCFG (v001 Nvidia AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x3fff9740
ACPI: MADT (v001 Nvidia AWRDACPI 0x42302e31 AWRD 0x00000000) @ 0x3fff9440
ACPI: DSDT (v001 NVIDIA AWRDACPI 0x00001000 MSFT 0x0100000e) @ 0x00000000
ACPI: PM-Timer IO Port: 0x4008
Allocating PCI resources starting at 50000000 (gap: 40000000:a0000000)
Built 1 zonelists
Kernel command line: BOOT_IMAGE=2616 ro root=305
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 65536 bytes)
Detected 2010.158 MHz processor.
Using pmtmr for high-res timesource
Console: colour VGA+ 80x25
Dentry cache hash table entries: 262144 (order: 8, 1048576 bytes)
Inode-cache hash table entries: 131072 (order: 7, 524288 bytes)
Memory: 1034600k/1048512k available (2355k kernel code, 13304k reserved, 787k
data, 140k init, 0k highmem)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Calibrating delay using timer specific routine.. 4026.84 BogoMIPS (lpj=2013424)
Mount-cache hash table entries: 512
CPU: After generic identify, caps: 078bfbff e3d3fbff 00000000 00000000 00000001
00000000 00000001
CPU: After vendor identify, caps: 078bfbff e3d3fbff 00000000 00000000 00000001
00000000 00000001
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 512K (64 bytes/line)
CPU: After all inits, caps: 078bfbff e3d3fbff 00000000 00000010 00000001
00000000 00000001
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU: AMD Athlon(tm) 64 Processor 3200+ stepping 02
Checking 'hlt' instruction... OK.
Checking for popad bug... OK.
ACPI: setting ELCR to 0200 (from 0cb8)
NET: Registered protocol family 16
ACPI: bus type pci registered
PCI: PCI BIOS revision 3.00 entry at 0xf21d0, last bus=5
PCI: Using MMCONFIG
ACPI: Subsystem revision 20060127
ACPI: Interpreter enabled
ACPI: Using PIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (0000:00)
PCI: Probing PCI hardware (bus 00)
PCI: Transparent bridge - 0000:00:09.0
Boot video device is 0000:01:00.0
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.HUB0._PRT]
ACPI: PCI Interrupt Link [LNK1] (IRQs 3 4 5 7 9 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNK2] (IRQs 3 4 5 7 9 *10 11 12 14 15)
ACPI: PCI Interrupt Link [LNK3] (IRQs 3 4 5 7 9 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LNK4] (IRQs 3 4 5 7 9 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNK5] (IRQs 3 4 5 7 9 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LUBA] (IRQs 3 4 5 *7 9 10 11 12 14 15)
ACPI: PCI Interrupt Link [LUBB] (IRQs 3 4 5 7 9 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LMAC] (IRQs 3 4 *5 7 9 10 11 12 14 15)
ACPI: PCI Interrupt Link [LACI] (IRQs 3 4 5 7 9 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LMCI] (IRQs 3 4 5 7 9 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LSMB] (IRQs 3 *4 5 7 9 10 11 12 14 15)
ACPI: PCI Interrupt Link [LUB2] (IRQs *3 4 5 7 9 10 11 12 14 15)
ACPI: PCI Interrupt Link [LIDE] (IRQs 3 4 5 7 9 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LSID] (IRQs 3 4 5 7 9 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LFID] (IRQs 3 4 5 7 9 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LPCA] (IRQs 3 4 5 7 9 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [APC1] (IRQs 16) *0, disabled.
ACPI: PCI Interrupt Link [APC2] (IRQs 17) *0, disabled.
ACPI: PCI Interrupt Link [APC3] (IRQs 18) *0, disabled.
ACPI: PCI Interrupt Link [APC4] (IRQs 19) *0, disabled.
ACPI: PCI Interrupt Link [APC5] (IRQs *16), disabled.
ACPI: PCI Interrupt Link [APCF] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APCG] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APCH] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APCJ] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APCK] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APCS] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APCL] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APCZ] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APSI] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APSJ] (IRQs 20 21 22 23) *0, disabled.
ACPI: PCI Interrupt Link [APCP] (IRQs 20 21 22 23) *0, disabled.
Linux Plug and Play Support v0.97 (c) Adam Belay
pnp: PnP ACPI init
pnp: PnP ACPI: found 10 devices
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
PCI: Using ACPI for IRQ routing
PCI: If a device doesn't work, try "pci=routeirq".  If it helps, post a report
pnp: 00:01: ioport range 0x4000-0x407f could not be reserved
pnp: 00:01: ioport range 0x4080-0x40ff has been reserved
pnp: 00:01: ioport range 0x4400-0x447f has been reserved
pnp: 00:01: ioport range 0x4480-0x44ff could not be reserved
pnp: 00:01: ioport range 0x4800-0x487f has been reserved
pnp: 00:01: ioport range 0x4880-0x48ff has been reserved
PCI: Bridge: 0000:00:09.0
  IO window: d000-dfff
  MEM window: d8000000-d9ffffff
  PREFETCH window: 50000000-500fffff
PCI: Bridge: 0000:00:0b.0
  IO window: disabled.
  MEM window: disabled.
  PREFETCH window: disabled.
PCI: Bridge: 0000:00:0c.0
  IO window: disabled.
  MEM window: disabled.
  PREFETCH window: disabled.
PCI: Bridge: 0000:00:0d.0
  IO window: disabled.
  MEM window: disabled.
  PREFETCH window: disabled.
PCI: Bridge: 0000:00:0e.0
  IO window: disabled.
  MEM window: d0000000-d7ffffff
  PREFETCH window: c0000000-cfffffff
PCI: Setting latency timer of device 0000:00:09.0 to 64
PCI: Setting latency timer of device 0000:00:0b.0 to 64
PCI: Setting latency timer of device 0000:00:0c.0 to 64
PCI: Setting latency timer of device 0000:00:0d.0 to 64
PCI: Setting latency timer of device 0000:00:0e.0 to 64
Machine check exception polling timer started.
JFS: nTxBlock = 8084, nTxLock = 64676
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
PCI: Setting latency timer of device 0000:00:0b.0 to 64
pcie_portdrv_probe->Dev[005d:10de] has invalid IRQ. Check vendor BIOS
assign_interrupt_mode Found MSI capability
Allocate Port Service[0000:00:0b.0:pcie00]
Allocate Port Service[0000:00:0b.0:pcie03]
PCI: Setting latency timer of device 0000:00:0c.0 to 64
pcie_portdrv_probe->Dev[005d:10de] has invalid IRQ. Check vendor BIOS
assign_interrupt_mode Found MSI capability
Allocate Port Service[0000:00:0c.0:pcie00]
Allocate Port Service[0000:00:0c.0:pcie03]
PCI: Setting latency timer of device 0000:00:0d.0 to 64
pcie_portdrv_probe->Dev[005d:10de] has invalid IRQ. Check vendor BIOS
assign_interrupt_mode Found MSI capability
Allocate Port Service[0000:00:0d.0:pcie00]
Allocate Port Service[0000:00:0d.0:pcie03]
PCI: Setting latency timer of device 0000:00:0e.0 to 64
pcie_portdrv_probe->Dev[005d:10de] has invalid IRQ. Check vendor BIOS
assign_interrupt_mode Found MSI capability
Allocate Port Service[0000:00:0e.0:pcie00]
Allocate Port Service[0000:00:0e.0:pcie03]
ACPI: Power Button (FF) [PWRF]
ACPI: Power Button (CM) [PWRB]
ACPI: Fan [FAN] (on)
ACPI: Thermal Zone [THRM] (40 C)
Real Time Clock Driver v1.12ac
PNP: PS/2 Controller [PNP0303:PS2K] at 0x60,0x64 irq 1
PNP: PS/2 controller doesn't have AUX irq; using default 12
serio: i8042 AUX port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
loop: loaded (max 8 devices)
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
r8169 Gigabit Ethernet driver 2.2LK loaded
ACPI: PCI Interrupt Link [LNK3] enabled at IRQ 11
PCI: setting IRQ 11 as level-triggered
ACPI: PCI Interrupt 0000:05:08.0[A] -> Link [LNK3] -> GSI 11 (level, low) -> IRQ 11
eth0: Identified chip type is 'RTL8169s/8110s'.
eth0: RTL8169 at 0xf0804000, 00:08:a1:3c:34:79, IRQ 11
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
Probing IDE interface ide0...
hda: ST340823A, ATA DISK drive
hdb: ST38410A, ATA DISK drive
Probing IDE interface ide1...
hdc: TSSTcorpDVD-ROM SH-D162C, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 128KiB
hda: 78165360 sectors (40020 MB) w/512KiB Cache, CHS=65535/16/63
hda: cache flushes not supported
 hda: hda1 hda2 < hda5 hda6 hda7 hda8 hda9 hda10 >
hdb: max request size: 128KiB
hdb: 16841664 sectors (8622 MB) w/512KiB Cache, CHS=16708/16/63
hdb: cache flushes not supported
 hdb: hdb1 hdb2 < hdb5 hdb6 hdb7 hdb8 hdb9 hdb10 >
hdc: ATAPI 32X DVD-ROM drive, 256kB Cache
Uniform CD-ROM driver Revision: 3.20
ide-floppy driver 0.99.newide
ohci_hcd: 2005 April 22 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
ohci_hcd: block sizes: ed 64 td 64
ACPI: PCI Interrupt Link [LUBA] enabled at IRQ 7
PCI: setting IRQ 7 as level-triggered
ACPI: PCI Interrupt 0000:00:02.0[A] -> Link [LUBA] -> GSI 7 (level, low) -> IRQ 7
PCI: Setting latency timer of device 0000:00:02.0 to 64
ohci_hcd 0000:00:02.0: OHCI Host Controller
drivers/usb/core/inode.c: creating file 'devices'
drivers/usb/core/inode.c: creating file '001'
ohci_hcd 0000:00:02.0: new USB bus registered, assigned bus number 1
ohci_hcd 0000:00:02.0: irq 7, io mem 0xda001000
ohci_hcd 0000:00:02.0: resetting from state 'reset', control = 0x600
ohci_hcd 0000:00:02.0: OHCI controller state
ohci_hcd 0000:00:02.0: OHCI 1.0, NO legacy support registers
ohci_hcd 0000:00:02.0: control 0x683 RWE RWC HCFS=operational CBSR=3
ohci_hcd 0000:00:02.0: cmdstatus 0x00000 SOC=0
ohci_hcd 0000:00:02.0: intrstatus 0x00000044 RHSC SF
ohci_hcd 0000:00:02.0: intrenable 0x8000000a MIE RD WDH
ohci_hcd 0000:00:02.0: hcca frame #0003
ohci_hcd 0000:00:02.0: roothub.a 0100020a POTPGT=1 NPS NDP=10(10)
ohci_hcd 0000:00:02.0: roothub.b 00000000 PPCM=0000 DR=0000
ohci_hcd 0000:00:02.0: roothub.status 00008000 DRWE
ohci_hcd 0000:00:02.0: roothub.portstatus [0] 0x00000100 PPS
ohci_hcd 0000:00:02.0: roothub.portstatus [1] 0x00010301 CSC LSDA PPS CCS
ohci_hcd 0000:00:02.0: roothub.portstatus [2] 0x00000100 PPS
ohci_hcd 0000:00:02.0: roothub.portstatus [3] 0x00000100 PPS
ohci_hcd 0000:00:02.0: roothub.portstatus [4] 0x00000100 PPS
ohci_hcd 0000:00:02.0: roothub.portstatus [5] 0x00000100 PPS
ohci_hcd 0000:00:02.0: roothub.portstatus [6] 0x00000100 PPS
ohci_hcd 0000:00:02.0: roothub.portstatus [7] 0x00000100 PPS
ohci_hcd 0000:00:02.0: roothub.portstatus [8] 0x00000100 PPS
ohci_hcd 0000:00:02.0: roothub.portstatus [9] 0x00000100 PPS
ohci_hcd 0000:00:02.0: created debug files
ohci_hcd 0000:00:02.0: supports USB remote wakeup
usb usb1: default language 0x0409
usb usb1: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: OHCI Host Controller
usb usb1: Manufacturer: Linux 2.6.16 ohci_hcd
usb usb1: SerialNumber: 0000:00:02.0
usb usb1: uevent
usb usb1: device is self-powered
usb usb1: configuration #1 chosen from 1 choice
usb usb1: adding 1-0:1.0 (config #1, interface 0)
usb 1-0:1.0: uevent
hub 1-0:1.0: usb_probe_interface
hub 1-0:1.0: usb_probe_interface - got id
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 10 ports detected
hub 1-0:1.0: standalone hub
hub 1-0:1.0: no power switching (usb 1.0)
hub 1-0:1.0: global over-current protection
hub 1-0:1.0: power on to power good time: 2ms
hub 1-0:1.0: local power source is good
hub 1-0:1.0: no over-current condition exists
hub 1-0:1.0: state 7 ports 10 chg 0000 evt 0000
drivers/usb/core/inode.c: creating file '001'
Initializing USB Mass Storage driver...
ohci_hcd 0000:00:02.0: GetStatus roothub.portstatus [1] = 0x00010301 CSC LSDA
PPS CCS
hub 1-0:1.0: port 2, status 0301, change 0001, 1.5 Mb/s
hub 1-0:1.0: debounce: port 2: total 100ms stable 100ms status 0x301
ohci_hcd 0000:00:02.0: GetStatus roothub.portstatus [1] = 0x00100303 PRSC LSDA
PPS PES CCS
usb 1-2: new low speed USB device using ohci_hcd and address 2
ohci_hcd 0000:00:02.0: GetStatus roothub.portstatus [1] = 0x00100303 PRSC LSDA
PPS PES CCS
usb 1-2: skipped 1 descriptor after interface
usb 1-2: default language 0x0409
usb 1-2: new device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-2: Product: USB-PS/2 Optical Mouse
usb 1-2: Manufacturer: B16_b_02
usb 1-2: uevent
usb 1-2: device is bus-powered
usb 1-2: configuration #1 chosen from 1 choice
usb 1-2: adding 1-2:1.0 (config #1, interface 0)
usb 1-2:1.0: uevent
drivers/usb/core/inode.c: creating file '002'
hub 1-0:1.0: state 7 ports 10 chg 0000 evt 0004
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usbhid 1-2:1.0: usb_probe_interface
usbhid 1-2:1.0: usb_probe_interface - got id
HID Mouse 0xc024 forced to 2 ms polling
input: B16_b_02 USB-PS/2 Optical Mouse as /class/input/input0
input: USB HID v1.10 Mouse [B16_b_02 USB-PS/2 Optical Mouse] on usb-0000:00:02.0-2
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
i2c_adapter i2c-0: nForce2 SMBus adapter at 0x4c00
i2c_adapter i2c-1: nForce2 SMBus adapter at 0x4c40
Advanced Linux Sound Architecture Driver Version 1.0.11rc2 (Wed Jan 04 08:57:20
2006 UTC).
ACPI: PCI Interrupt Link [LNK2] enabled at IRQ 10
PCI: setting IRQ 10 as level-triggered
ACPI: PCI Interrupt 0000:05:07.0[A] -> Link [LNK2] -> GSI 10 (level, low) -> IRQ 10
ALSA device list:
  #0: SBLive! Platinum [CT4760P] (rev.7, serial:0x80401102) at 0xd000, irq 10
NET: Registered protocol family 2
IP route cache hash table entries: 65536 (order: 6, 262144 bytes)
TCP established hash table entries: 262144 (order: 8, 1048576 bytes)
TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
TCP: Hash tables configured (established 262144 bind 65536)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
CCID: Registered CCID 3 (ccid3)
Using IPI Shortcut mode
ACPI wakeup devices: 
HUB0 XVR0 XVR1 XVR2 XVR3 USB0 USB2 MMAC MMCI 
ACPI: (supports S0 S1 S3 S4 S5)
UDF-fs: No VRS found
VFS: Mounted root (jfs filesystem) readonly.
Freeing unused kernel memory: 140k freed
input: AT Translated Set 2 keyboard as /class/input/input1
nvidia: module license 'NVIDIA' taints kernel.
ACPI: PCI Interrupt 0000:01:00.0[A] -> Link [LNK3] -> GSI 11 (level, low) -> IRQ 11
PCI: Setting latency timer of device 0000:01:00.0 to 64
NVRM: loading NVIDIA Linux x86 NVIDIA Kernel Module  1.0-8178  Wed Dec 14
16:22:51 PST 2005
Adding 257000k swap on /dev/hda6.  Priority:-1 extents:1 across:257000k
r8169: eth0: link up
Comment 1 Trond Myklebust 2006-03-20 13:51:55 UTC
Booting what with the previous kernel? The client? The server?

Which version of NFS? 

I certainly have no problems on NFSv4/v3/v2 on a Linux client against a Solaris
server.
Comment 2 Han Boetes 2006-03-20 14:02:51 UTC
Linux nfs3 is the client. OpenBSD nfs3 is the server.
Comment 3 Trond Myklebust 2006-03-20 14:34:30 UTC
What are the owner+permissions on the parent directory /nfs?
Comment 4 Han Boetes 2006-03-20 14:45:17 UTC
~% l /home/ G public
drwxr-xr-x  4 root              nfs    512 Feb  5 15:00 public
~% l /home/public G han   
drwxr-xr-x 23 han       nfs 1.5K Mar 20 09:38 han

Remember... I don't have to change anything but to reboot with the 2.6.16 kernel
instead of the 2.6.15.6 kernel to reproduce this. Nothing else changes.
Comment 5 Trond Myklebust 2006-03-20 14:57:50 UTC
I'm still not able to reproduce against my servers.

Could you send me a binary tcpdump of what happens when you do "echo foo >/..."
from the restricted account? Use something like

tcpdump -w /tmp/foo.dmp -s 9000 host server and port 2049

Then send /tmp/foo.dmp
Comment 6 Han Boetes 2006-03-20 15:50:43 UTC
Better use this tcpdump command:

~% sudo tcpdump -s9000 -c100 -Nt udp port 2049 
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 9000 bytes
IP marsupilami.1980904077 > firewall.nfs: 116 getattr fh 0,7/-1701588781
IP firewall.nfs > marsupilami.1980904077: reply ok 112 getattr REG 664 ids
1000/3000 sz 0
IP marsupilami.1997681293 > firewall.nfs: 120 access fh 0,7/-1701588781 002d
IP firewall.nfs > marsupilami.1997681293: reply ok 120 access c 000d
IP marsupilami.2014458509 > firewall.nfs: 144 setattr fh 0,7/-1701588781
IP firewall.nfs > marsupilami.2014458509: reply ok 144 setattr ERROR: Operation
not permitted

~% cat ./test 
#!/bin/sh
echo foo > /mnt/nfs/nowplaying
~% sudo -u bascuppen ./test
./test[2]: cannot create /mnt/nfs/nowplaying: Operation not permitted
Comment 7 Trond Myklebust 2006-03-20 15:58:48 UTC
...which shows us that the server is rejecting our SETATTR call, but not why.

Please could you either send a binary tcpdump, or else use 'tethereal' with the
'-V' flag set in order to get full output for the SETATTR.
Comment 8 Han Boetes 2006-03-20 16:16:20 UTC
Created attachment 7619 [details]
sudo tcpdump -s9000 -c100 -w file -Nt udp port 2049
Comment 9 Trond Myklebust 2006-03-20 20:03:59 UTC
That looks like a server bug to me:

The ACCESS call shows that we are supposed to be able to read, modify and extend
the file, however when the client tries to do a SETATTR to set the time, then
the server refuses.

Could you try to do 'touch /mnt/nfs/nowplaying' using the 2.6.15.6 client (the
one that 'works')? I'll bet that fails with the same error.
Comment 10 Han Boetes 2006-03-20 20:27:53 UTC
Hmmm you are right. Odd. I'll ask the OpenBSD developers.
Comment 11 Han Boetes 2006-03-26 20:44:47 UTC
Otto Moerbeek wrote:
> For some reason your test generates a setattr call, which is normally        
                                                       
> not done for writing a file.                                                 
                                                       

He hits the nail on the head here. Since 2.6.16 Linux nfs client uses setattr
while writing to a file. And that is new and unusual behaviour.

Ted Unangst wrote:
> this [using touch does not work, while writing does] is normal.
> setattr only works if you are the owner of the file.                         
                                      Why the client
> has suddenly decided that it needs to do a setattr when                      
                                        
> it didn't yesterday is beyond me.                                            
                                                     
Comment 12 Trond Myklebust 2006-03-27 08:40:16 UTC
He is bullshitting. SETATTR calls to set the timestamp are legal whenever and
wherever as long as you have write permissions to the file.

We changed the behaviour precisely _because_ we were previously incompliant with
respect to the POSIX and Single UNIX Spec behaviour on open(O_CREAT).

If OpenBSD isn't willing to accept SETATTR to change the timestamp on files for
which the user has write permissions, then I suggest you change servers to
something that is compliant with the NFS spec.
Comment 13 Trond Myklebust 2006-03-27 08:46:19 UTC
Closing bug as it appears to be an OpenBSD server issue.