From khera@kciLink.com  Fri Aug 25 09:26:16 2000
Return-Path: <khera@kciLink.com>
Received: from kci.kciLink.com (kci.kciLink.com [204.117.82.1])
	by hub.freebsd.org (Postfix) with ESMTP id 7E80037B440
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 25 Aug 2000 09:26:15 -0700 (PDT)
Received: from onceler.kciLink.com (onceler.kciLink.com [204.117.82.2])
	by kci.kciLink.com (Postfix) with ESMTP id 826D9E8D2
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 25 Aug 2000 12:26:14 -0400 (EDT)
Received: (from khera@localhost)
	by onceler.kciLink.com (8.9.3/8.9.3) id MAA69210;
	Fri, 25 Aug 2000 12:26:14 -0400 (EDT)
	(envelope-from khera@kci.kciLink.com)
Message-Id: <200008251626.MAA69210@onceler.kciLink.com>
Date: Fri, 25 Aug 2000 12:26:14 -0400 (EDT)
From: <khera@kciLink.com>
Reply-To: khera@kciLink.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: NFS client ignores read-only setting
X-Send-Pr-Version: 3.2

>Number:         20842
>Category:       kern
>Synopsis:       NFS client ignores read-only file setting
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    dillon
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 25 09:30:01 PDT 2000
>Closed-Date:    Mon Nov 20 12:37:33 PST 2000
>Last-Modified:  Mon Nov 20 12:38:10 PST 2000
>Originator:     Vivek Khera
>Release:        FreeBSD 4.1-STABLE i386
>Organization:
>Environment:

	
FreeBSD 4.1-STABLE as of August 23, 2000
BSD/OS 4.0.1 fully patched
BSD/OS 3.1 fully patched
RedHat 6.0 Linux kernel 2.2.10

>Description:

	

I have one MAJOR issue with the FreeBSD NFS client: it ignores
read-only attribute on files owned by the current UID.

Example.  "kci" is a BSD/OS 4.0.1 server with all applicable patches.
"onceler" is a FreeBSD 4.1-STABLE (current thru wednesday's version).
The file system is served from kci to onceler.  The FreeBSD system is
the *only* one that ignores the read-only setting.  Linux and other
BSD/OS systems honor it as expected.

On the server:

[kci]% whoami
khera
[kci]% ls -l mysamplereadonlyfile 
-r--r--r--  1 khera  user  0 Aug 25 11:42 mysamplereadonlyfile
[kci]% echo foo >> mysamplereadonlyfile
mysamplereadonlyfile: Permission denied.
[kci]% df .
Filesystem  512-blocks     Used    Avail Capacity  Mounted on
/dev/sd1h     17227158  8928736  7437064    55%    /u/kci1


On the FreeBSD 4.1-STABLE client:

[onceler]% whoami
khera
[onceler]% ls -l mysamplereadonlyfile 
-r--r--r--  1 khera  user  0 Aug 25 11:42 mysamplereadonlyfile
[onceler]% echo foo >> mysamplereadonlyfile 
[onceler]% ls -l mysamplereadonlyfile 
-r--r--r--  1 khera  user  4 Aug 25 11:44 mysamplereadonlyfile
[onceler]% df .
Filesystem   1K-blocks     Used    Avail Capacity  Mounted on
kci:/u/kci1    8613579  4464387  3718513    55%    /amd/kci/u/kci1


On a Linux 2.2.10 (Redhat 6.0) client:

[truffula]% whoami
khera
[truffula]% ls -l mysamplereadonlyfile 
-r--r--r--   1 khera    users           0 Aug 25 11:49 mysamplereadonlyfile
[truffula]% echo foo >> mysamplereadonlyfile
mysamplereadonlyfile: Permission denied.
[truffula]% df .
Filesystem           1k-blocks      Used Available Use% Mounted on
kci:/u/kci1            8613579   4464384   3718516  55% /n/kci1


On a BSD/OS 4.0.1 client:

[brc]% whoami
khera
[brc]% ls -l mysamplereadonlyfile 
-r--r--r--  1 khera  user  0 Aug 25 11:49 mysamplereadonlyfile
[brc]% echo foo >> mysamplereadonlyfile 
mysamplereadonlyfile: Permission denied.
[brc]% df .
Filesystem   512-blocks     Used    Avail Capacity  Mounted on
kci:/u/kci1    17227158  8928768  7437032    55%    /amd/kci/u/kci1

On a BSD/OS 3.1 client:

[zax]% whoami
khera
[zax]% ls -l mysamplereadonlyfile 
-r--r--r--  1 khera  user  0 Aug 25 11:49 mysamplereadonlyfile
[zax]% echo foo >> mysamplereadonlyfile 
mysamplereadonlyfile: Permission denied.
[zax]% df .
Filesystem   512-blocks     Used    Avail Capacity  Mounted on
kci:/u/kci1    17227158  8928774  7437026    55%    /amd/kci/u/kci1


Using a BSD/OS client (kci) from the FreeBSD box (onceler) as a NFS
server:

[onceler]% whoami
khera
[onceler]% ls -l myreadonlyfile
-r--r--r--  1 khera  wheel  0 Aug 25 11:54 myreadonlyfile
[onceler]% echo foo >> myreadonlyfile
myreadonlyfile: Permission denied.
[onceler]% df .
Filesystem   1K-blocks     Used    Avail Capacity  Mounted on
/dev/ad0s1g   10401470   952122  8617231    10%    /u/onceler1


[kci]% whoami
khera
[kci]% ls -l myreadonlyfile 
-r--r--r--  1 khera  wheel  0 Aug 25 11:54 myreadonlyfile
[kci]% echo foo >> myreadonlyfile 
myreadonlyfile: Permission denied.
[kci]% df .
Filesystem           512-blocks     Used    Avail Capacity  Mounted on
onceler:/u/onceler1    20802940  1904244 17234462    10%    /amd/onceler/u/onceler1

If I could ever get Linux to properly export to BSD/OS and/or FreeBSD,
I'd try it as a server, but I think NFS on linux is a waste of my
time.


BSDi support feels that it is a client issue.  I had the same problems
with FreeBSD 3.5 NFS client.


This messes me up all the time with RCS files that are read-only, and
since FreeBSD client ignores that, I edit them without checking them
out first, then when the file is checked out, away goes my work!  I
have lost much work because of this...

Any ideas on what to do to fix it?



>How-To-Repeat:

	

see above.

>Fix:

	

I wish there were one!

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: jedgar 
Responsible-Changed-When: Fri Aug 25 11:52:10 PDT 2000 
Responsible-Changed-Why:  
Misfiled PR 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20842 
Responsible-Changed-From-To: freebsd-bugs->dillon 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Mon Aug 28 03:14:15 PDT 2000 
Responsible-Changed-Why:  
Over to our NFS maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20842 

From: Vivek Khera <vivek@khera.org>
To: freebsd-gnats-submit@FreeBSD.org, khera@kciLink.com
Cc:  
Subject: Re: kern/20842: NFS client ignores read-only file setting
Date: Fri, 17 Nov 2000 17:11:11 -0500

 This is a multi-part message in MIME format.
 --------------0287DBE171B6D9ABB099348D
 Content-Type: text/plain; charset=us-ascii
 Content-Transfer-Encoding: 7bit
 
 This problem seems to be with the BSD/OS NFS server.  I just rid my self
 of all of them, and everything works ok now.  Thanks.
 --------------0287DBE171B6D9ABB099348D
 Content-Type: text/x-vcard; charset=us-ascii;
  name="vivek.vcf"
 Content-Transfer-Encoding: 7bit
 Content-Description: Card for Vivek Khera
 Content-Disposition: attachment;
  filename="vivek.vcf"
 
 begin:vcard 
 n:Khera;Vivek
 tel;fax:301-545-6899
 tel;work:301-545-6996
 x-mozilla-html:TRUE
 url:http://www.khera.org/~vivek/
 org:Khera Communications, Inc.
 version:2.1
 email;internet:vivek@khera.org
 adr;quoted-printable:;;1445 Research Blvd=0D=0A5th Floor;Rockville;MD;20850;USA
 x-mozilla-cpt:;0
 fn:Vivek Khera
 end:vcard
 
 --------------0287DBE171B6D9ABB099348D--
 
 
State-Changed-From-To: open->closed 
State-Changed-By: dillon 
State-Changed-When: Mon Nov 20 12:37:33 PST 2000 
State-Changed-Why:  
Author indicated that the problem was BSDI specific and not an 
issue w/ FreeBSD. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=20842 
>Unformatted:
