Bug 20842

Summary: NFS client ignores read-only file setting
Product: Base System Reporter: Vivek Khera <khera>
Component: kernAssignee: Matt Dillon <dillon>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.1-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
vivek.vcf none

Description Vivek Khera 2000-08-25 17:30:01 UTC
	

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?

Fix: 

I wish there were one!
How-To-Repeat: 
	

see above.
Comment 1 Chris D.Faulhaber freebsd_committer freebsd_triage 2000-08-25 19:52:10 UTC
Responsible Changed
From-To: gnats-admin->freebsd-bugs

Misfiled PR
Comment 2 Sheldon Hearn freebsd_committer freebsd_triage 2000-08-28 11:14:15 UTC
Responsible Changed
From-To: freebsd-bugs->dillon

Over to our NFS maintainer.
Comment 3 Vick Khera 2000-11-17 22:11:11 UTC
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.
Comment 4 Matt Dillon freebsd_committer freebsd_triage 2000-11-20 20:37:33 UTC
State Changed
From-To: open->closed

Author indicated that the problem was BSDI specific and not an 
issue w/ FreeBSD.