NetBSD Problem Report #34448

From  Fri Sep  1 21:10:06 2006
Return-Path: <>
Received: from ( [])
	by (Postfix) with ESMTP id 2B7D963BA3E
	for <>; Fri,  1 Sep 2006 21:10:06 +0000 (UTC)
Message-Id: <>
Date: Fri, 1 Sep 2006 23:09:52 +0200 (CEST)
Subject: NFS fails with creat(...,0)
X-Send-Pr-Version: 3.95

>Number:         34448
>Category:       kern
>Synopsis:       NFS fails to ftruncate() after creat(...,0)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 01 21:15:00 +0000 2006
>Originator:     Michael van Elst
>Release:        NetBSD 3.1_RC1
                                Michael van Elst
                                "A potential Snark may lurk in every tree."

System: NetBSD henery 3.1_RC1 NetBSD 3.1_RC1 (HENERY) #35: Wed Aug 23 23:44:43 CEST 2006 src@henery:/usr/obj/home/src/sys/arch/i386/compile/HENERY i386
Architecture: i386
Machine: i386
On UNIX filesystems you can creat() a file with mode 0 (either by
specifying a mode argument of 0 or by using a umask of 777) but
still access the created file through the newly opened file handle.
An NFS server emulates this behaviour by ignoring permissions for
file operations when the file is accessed by its owner.

On NetBSD this fails when the subsequent operation is ftruncate().
As a result the iozone benchmark program fails.


use Fcntl;

sysopen F,"foo",O_RDWR|O_CREAT,0
        or die "sysopen: $!\n";
truncate F,0
        or die "truncate: $!\n";



NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.