From sanpei@yy.cs.keio.ac.jp  Sun Oct 19 08:21:01 1997
Received: from kogwy.cc.keio.ac.jp (kogwy.cc.keio.ac.jp [131.113.1.1])
          by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id IAA13173
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 19 Oct 1997 08:20:57 -0700 (PDT)
          (envelope-from sanpei@yy.cs.keio.ac.jp)
Received: from fumi.yy.cs.keio.ac.jp (sanpei.user.towntv.co.jp [203.140.33.133])
	by kogwy.cc.keio.ac.jp (8.8.7/3.6Wbeta6) with ESMTP id AAA19730
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 20 Oct 1997 00:20:54 +0900 (JST)
Received: (from sanpei@localhost)
	by fumi.yy.cs.keio.ac.jp (8.8.7/3.6Wbeta4) id AAA01031;
	Mon, 20 Oct 1997 00:21:00 +0900 (JST)
Message-Id: <199710191521.AAA01031@fumi.yy.cs.keio.ac.jp>
Date: Mon, 20 Oct 1997 00:21:00 +0900 (JST)
From: sanpei@yy.cs.keio.ac.jp
Reply-To: sanpei@yy.cs.keio.ac.jp
To: FreeBSD-gnats-submit@freebsd.org
Subject: NFSv3 server readonly file permission problem
X-Send-Pr-Version: 3.2

>Number:         4805
>Category:       bin
>Synopsis:       NFSv3 server readonly file permission problem
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 19 08:30:01 PDT 1997
>Closed-Date:    Tue Apr 14 12:02:24 PDT 1998
>Last-Modified:  Tue Apr 14 12:02:39 PDT 1998
>Originator:     MIHIRA Yoshiro
>Release:        FreeBSD 2.2.5-971015-BETA i386
>Organization:
Keio Univ.
>Environment:

	NFSv3 server on FreeBSD 2.2(not tested on FreeBSD-current)
	and NFSv3 client.

>Description:

	FreeBSD NFSv3 server has readonly file permission problem
	under xemacs and mule.

	I think this problem is from NFSv3 server file handle program.

	This problem is:
	    o a file is managemented by RCS and still checked in.
	    o If that file does not be checked out
		and is edited by emacs,
	    o We can edit it and write it to NFSv3 server.
	      There is no warning message.

	But I can't find out and fix it.

>How-To-Repeat:

1. create readonly file on NFS server
-r--r--r--  1 sanpei  yamamoto  1421 Oct 19 23:54 test

2. open test file by mule (also checked by xemacs)
% mule -nw test

3. then....

case A [no problem]
NFS server	Solaris 2.5.1 for Intel
NFS client	FreeBSD 2.2.x and nfsv3 mount

in minibuffer
``Note: file is write protected''
--
case B [no problem]
NFS server	FreeBSD 2.2.2-R
NFS client	FreeBSD 2.2.5-BETA and nfs**v2** mount

in minibuffer
``Note: file is write protected''
--
case C [problem]
NFS server	FreeBSD 2.2.2-R
NFS client	FreeBSD 2.2.5-BETA and nfs**v3** mount

open read/write mode and it can be editted and written by save-file.

>Fix:
	
	Sorry I have no idea to solve it.

>Release-Note:
>Audit-Trail:

From: MIHIRA "Sanpei" Yoshiro <sanpei@yy.cs.keio.ac.jp>
To: freebsd-gnats-submit@freebsd.org, sanpei@yy.cs.keio.ac.jp
Cc:  Subject: Re: bin/4805: NFSv3 server readonly file permission problem
Date: Mon, 20 Oct 1997 09:43:54 +0900

 Sorry.
 
   I missed selection of categoly for this problem report. It's kern
 categoly, not bin.
 
 Thank you.
 
 ---
 Yoshiro MIHIRA
 Dr. Candidate, Yamamoto Lab.
 Department of Computer Science
 Keio University. Yokohama, Japan
 

From: Bruce Evans <bde@zeta.org.au>
To: FreeBSD-gnats-submit@FreeBSD.ORG, sanpei@yy.cs.keio.ac.jp
Cc:  Subject: Re: bin/4805: NFSv3 server readonly file permission problem
Date: Tue, 21 Oct 1997 13:09:48 +1000

 >>How-To-Repeat:
 >
 >1. create readonly file on NFS server
 >-r--r--r--  1 sanpei  yamamoto  1421 Oct 19 23:54 test
 >...
 >case C [problem]
 >NFS server	FreeBSD 2.2.2-R
 >NFS client	FreeBSD 2.2.5-BETA and nfs**v3** mount
 >
 >open read/write mode and it can be editted and written by save-file.
 
 This is also broken with a FreeBSD-current client and server.
 
 The problem seems to be that nfsrv_access() pretends that the permissions
 are 777 for the owner of the file.  nfsV2 clients apparently understand
 this, but nfsrv_access() is used internally by V3 parts of the server,
 and the server doesn't understand itself.
 
 This seems to be fixed in NetBSD by passing an `override' arg to
 nfsrv_access() to tell it when to fudge the permissions.
 
 Bruce

From: MIHIRA "Sanpei" Yoshiro <sanpei@yy.cs.keio.ac.jp>
To: freebsd-gnats-submit@freebsd.org, bde@zeta.org.au
Cc:  Subject: Re: bin/4805: NFSv3 server readonly file permission problem
Date: Tue, 16 Dec 1997 13:28:57 +0900

   This problem is discussed in bin/5148[1]. I'm testing quick-hack
 patch.
 
   This problem comes from Original Lite(2?) source. BSD/OS also had
 this problem, and had solved.
 
   And I'm reviewing NetBSD nfs_serv.c source. (Ah, but NetBSD does
 not open CVS repository...)
 
 [1] bin/5148: mode of file and access  on NFS mounted partitions
 http://www.freebsd.org/cgi/query-pr.cgi?pr=5148
 
 ---
 Yoshiro MIHIRA
 Dr. Candidate, Yamamoto Lab.
 Department of Computer Science
 Keio University. Yokohama, Japan
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Tue Apr 14 12:02:24 PDT 1998 
State-Changed-Why:  
see PR 5148 
>Unformatted:
