Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Aug 2000 11:58:32 -0400 (EDT)
From:      Vivek Khera <khera@kciLink.com>
To:        stable@freebsd.org
Subject:   NFS client ignores "read-only" attribute on file
Message-ID:  <14758.38824.440415.870831@onceler.kciLink.com>

next in thread | raw e-mail | index | archive | help
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?

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.                Khera Communications, Inc.
Internet: khera@kciLink.com       Rockville, MD       +1-301-545-6996
GPG & MIME spoken here            http://www.khera.org/~vivek/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14758.38824.440415.870831>