SUMMARY: NFS write error #13 (semi-long)

From: kes@gvlf6.gvl.unisys.com
Date: Thu May 30 1991 - 08:54:35 CDT


My original question:

Could someone please explain what:
NFS write error #13 on host xyz
means? I get this error during boot time of the workstations at
various times when starting up the daemons. This error does not
appear on the server at any time. My configuration is a 3/180 and 12
diskless 3/50s all running SunOS 4.1. I am also starting up
Ingres 6.3 during boot time. How do I solve this problem?

Summary of responses:
Almost everyone said that error #13 was a permissions problem and
to check /etc/exports.

Solution to my problem:
Indeed, it was /etc/exports. I recently had to add client swap space
for Ingres and since /export/swap was full, I used a mkfile and swapon
into a filesystem with no clinet root permissions in /etc/exports. I
put root=workstationames into /etc/exports for that filesystem, ran
exportfs and the problem was solved.

Again this list proves its worth. Full summary of the responses received
is below the following list of names.
Thanks much to:
mrwallen@UCSD.EDU (Mark R. Wallen)
nassio%cfassp8@harvard.harvard.edu (George Nassiopoulos)
odt@phillies.base.bellcore.com (Dan Transue)
Alastair Young <alastair@eucad.co.uk>
shankar@ulysses.att.com (Shankar Ishwar)
sabbagh@eds.com (Dave Sabbagh)
beig%FRULM63.BITNET@CUNYVM.CUNY.EDU (Jacques Beigbeder)
mark@gest20.SINet.SLB.COM (Mark Read)
carlo@white.stanford.edu (Carlo Tiana)
sundev!ronin!kevin@Sun.COM (Kevin Sheehan {Consulting Poster Child})
Charles <mcgrew@porthos.rutgers.edu>
unocal!richard@sunkist.West.Sun.COM (Richard Seegmiller)
thurlow@dhostwo.convex.com (Robert Thurlow)
Mike Raffety <oconnor!miker@oddjob.uchicago.edu>
Kenton C. Phillips <kenton@space.mit.edu>
maximus!andy@uunet.UU.NET (Andy Lynn)
chrisr@nosun.West.Sun.COM (Chris Rose - SE Sun/Portland)
mmikulska@UCSD.EDU (Margaret Mikulska)
era@niwot.scd.ucar.EDU (Ed Arnold)
deltam!flyer!mark@uunet.UU.NET (mark galbraith)
John DiMarco <jdd@db.toronto.edu>
yih%atom@cs.utah.edu (Benny Yih)
Keith.Abbey@Corp.Sun.COM (Keith Abbey - TSE)
David Trueman <david@cs.dal.ca>
Emmett Hogan <hogan@csl.sri.com>
stpeters@dawn.crd.ge.com (Dick St.Peters)
Aydin Edguer <edguer@alpha.ces.cwru.edu>
Margaret.Kapica@Corp.Sun.COM (Margaret Kapica)
"Anthony A. Datri" <datri@concave.convex.com>
easton@atlas.socsci.umn.edu (John T. Easton)
dj@astro.lsa.umich.edu (diab jerius)
trinkle@cs.purdue.edu (Daniel Trinkle)
visti@cs.hut.fi (Hannu Visti)

From: mrwallen@UCSD.EDU (Mark R. Wallen)

The X in the NFS write error #X messages is
simply good old "errno"--the system error
numbers. So #13 is permission denied.
(The errors and, ahem, descriptions are listed
in the beginning of section 2 of the manual
(the system call section)).

From: nassio%cfassp8@harvard.harvard.edu (George Nassiopoulos)

I believe NFS write error #13 happens when
a program is trying to write to an NFS mounted
file that is taken away from it...

e.g. the only time i get #13 is when a user
program is writing to an NFS mounted file,
and while the program is running, i umount
the file system on it's server (e.g. for backups)

From: odt@phillies.base.bellcore.com (Dan Transue)

/usr/include/sys/errno.h says that error code 13 is EACCES. The line is:

#define EACCES 13 /* Permission denied */

Perhaps something is not exported properly? If not, I'm looking forward
to the summary - I am always confused by these messages anyway! :-)

From: Alastair Young <alastair@eucad.co.uk>

These obscure numbers are documented in INTRO(2). 13 is "Permission Denied".
You either have no write access to the file, the disk is mounted ro or
you don't have root access for the disk.

From: shankar@ulysses.att.com (Shankar Ishwar)

This NFS error basically means that,
your clients don't have write permission
on the disks of your server. This happens
if your server disks are not mounted with
"rw" option. During bootup the clients
try to write certain files like /var/adm/messages,
etc., to the disks mounted from your server.
This error won't show up on the server
as the server is normally configured properly
while installing SunOS.

From: sabbagh@eds.com (Dave Sabbagh)

I get those when I export a sub directory of an already
exported directory or the other way around. For example,
if you export /usr/local then don't export /usr/local/bin.

There was mention of this error in one of the Sun Software
Technical Bulletins (1989 I think).

I'm sure there will be better responses but /exports is
the place to start looking.

From: beig%FRULM63.BITNET@CUNYVM.CUNY.EDU (Jacques Beigbeder)

Just look the file /usr/include/nfs/nfs.h, and after that, you have
to look /usr/include/sys/errno.h:

#define EACCES 13 /* Permission denied */

From: mark@gest20.SINet.SLB.COM (Mark Read)

Kes,
I experienced this problem a while back. It means that you do not have access
to do something. That something is most likely that you lack root access on
your server for your clients / and/or swap partitions. So make sure that
you are exporting the file systems correctly on your server with the
correct -root option and do not forget to run exportfs -a. You will
probably experience hung machines when they run out of local memory and start
swapping.

From: carlo@white.stanford.edu (Carlo Tiana)

I had this happen to me before - in my case it was a file system that
was getting written to by the client, without access permission (it was
either exported read only or without the -root=client_name option in
the server's /etc/fstab).
>From /usr/include/sys/errno.h:
#define EACCES 13 /* Permission denied */

From: sundev!ronin!kevin@Sun.COM (Kevin Sheehan {Consulting Poster Child})

grep 13 /usr/include/sys/errno.h
#define EACCES 13 /* Permission denied */

From: Charles <mcgrew@porthos.rutgers.edu>

Hi,

   13 is "EACCES" (Permission denied) -- see /usr/include/sys/errno.h.
Sounds like you're trying to write to a read-only-mounted filesystem
(/usr?) from your client(s)...

From: unocal!richard@sunkist.West.Sun.COM (Richard Seegmiller)

I believe that error #13 is generally a permission problem.

From: thurlow@dhostwo.convex.com (Robert Thurlow)

"write error <foo>" errors use numbers straight out of <errno.h>,
so 13 is EPERM. Something is trying a write that it isn't permitted
to do.

From: Mike Raffety <oconnor!miker@oddjob.uchicago.edu>

You can look up errno 13 in /usr/include/sys/errno.h; it's a
"Permission denied". Perhaps you're trying to write (as root)
to a filesystem that isn't exported with root permissions to that
client?

From: Kenton C. Phillips <kenton@space.mit.edu>

I believe that this is a 'write permission denied' message. Possibilities
which come to mind:

Check to see that the server's exports file is correct. Also doublecheck
the bootparams file. Make sure that the client's fstab file refers to the
correct filesystems, i.e., that it matches up with the bootparams database.

From: maximus!andy@uunet.UU.NET (Andy Lynn)

        I have gotten this error when a diskless client booted from its
server WITHOUT the client's name appearing in the server's /etc/hosts file.
All sorts of other hell broke loose as well; all the /dev devices were
unwritable by the client due to permission problems, etc. Adding the client
to /etc/hosts and doing a /var/yp make was NOT SUFFICIENT... all those daemons
from "rc" boot land were still screwed up. Rebooting the server with the
/etc/hosts entry did fix the problem.

From: chrisr@nosun.West.Sun.COM (Chris Rose - SE Sun/Portland)

This usually has something to do with permission problems. Are the
permissions on the swapfiles for the diskless machines OK?

An exportfs on the server should look like:

/usr2/export/root/timewarp -access=timewarp,root=timewarp
/usr2/export/swap/timewarp -access=timewarp,root=timewarp

And the swapfile itself should look like:

-rw------T 1 root 16777216 Feb 7 14:25 timewarp

Access on the swap dir should be like:

drwxr-xr-x 2 root 512 Jan 19 17:07 swap/

From: mmikulska@UCSD.EDU (Margaret Mikulska)

Look up /usr/include/sys/errno.h. It's "permission denied".

> I will summarize if requested. Please e-mail directly to me.

Please note that in this mailing list, a summary is ALWAYS expected.

From: era@niwot.scd.ucar.EDU (Ed Arnold)

error 13 is typically seen when booting up a station,
and the filesystem it tried to mount can't be accessed
because the client doesn't have permission (via
/etc/exports) to access it.

can't guess what this means in your situation ...
are you sure you're waiting until filesystems are
mounted before starting up programs that access them?

From: deltam!flyer!mark@uunet.UU.NET (mark galbraith)

Most likely the write error you are getting is a permissions problem. I have
a little program that given an errno error code (which is what you have here
even though it doesn't say so) it prints the definition of that error. Here is
the output from that program:

        flyer{122}> errno 13
        error definition: Permission denied
        flyer{123}>

You can get the same information by looking in the standard system header files
located in /usr/include. The file you want is /usr/include/sys/errno.h

From: John DiMarco <jdd@db.toronto.edu>

NFS write error #13 is "write permission denied". Your client is probably
trying to write to an nfs partition mounted read-only.

From: yih%atom@cs.utah.edu (Benny Yih)

        If you check your NFS stuff in the docs, it translates 13 into write
permission error. You are probably exporting that file system to the clients
incorrectly. Are you exporting w/ different permissions farther up the file
system tree for that disk partition ? (e.g., RO for /usr & using /usr/foo for
client swap )

From: Keith.Abbey@Corp.Sun.COM (Keith Abbey - TSE)

        The error can be found in the file /usr/include/sys/errno.h.
Error #13 is permission denied. Have you checked to see if these
directories have been exported rw? What are the permissions? Do
they check out? It's hard to say what the problem is with the limited
information. It will probably take some time consuming investigation.

From: David Trueman <david@cs.dal.ca>

I'm no expert on this, but I believe that #13 is a permission problem.
We encountered this when our exports file was out of date WRT what was exported.
Bringing the file up-to-date and re-exporting fixed it.

From: Emmett Hogan <hogan@csl.sri.com>

NFS write error #13 is a permissions error...maybe one of your daemons
is trying to write out it's pid to a file on a read only file system?

From: stpeters@dawn.crd.ge.com (Dick St.Peters)

Error 13 is "permission denied". Something on the client is trying to
write something on the server that the server thinks is not allowed.
Just what is hard to guess without more info, although if it's Ingres
related maybe someone else will know.

From: Aydin Edguer <edguer@alpha.ces.cwru.edu>

RTFM, "man 2 intro"

     EACCES 13 Permission denied
          An attempt was made to access a file in a way forbidden
          by the protection system.

> How do I solve this problem?

I don't know, you don't give very much information to work with.

Check your /etc/exports file on the server. Slow down the boot process
and try to see if one daemon is particular is causing the problems. Check
the permisssions on the log files.

From: Margaret.Kapica@Corp.Sun.COM (Margaret Kapica)

NFS error 13 means:

#define EACCES 13 /* Permission denied */

On the server in /etc/exports you should have root and swap
exported with -access=client,root=client

/export/root/client -access=client,root=client
/export/swap/client -access=client,root=client

To check that execute #exportfs -av

From: "Anthony A. Datri" <datri@concave.convex.com>

When you get a numeric error like that, look it up in
/usr/include/sys/errno.h. 0x13 is a common one -- permission denied.
With NFS, it usually means that something isn't exported the way you'd
like it to be.

From: easton@atlas.socsci.umn.edu (John T. Easton)

NFS write error 13 means write error; You have probably failed to give
write permission to your clients for the swap area on the server.
Check /etc/exports for permissions to the correct machines for each
swap area, rerun exportfs -av if necessary.

From: dj@astro.lsa.umich.edu (diab jerius)

I've had similar a similar thing happen. Somehow the clients lose track
of the server's exported file systems, or vice versa (whatever). the
way i usually solve it is be doing a "exportfs -a" on the server. if that
doesn't work, a reboot ususally does. As for why it happens, I don't know.
I sure would like to! I have similar problems when the server crashes. The
clients get NFS write errors like mad.

If you get any more helpful info than my few scraps, I'd appreciate getting
a summary. Thanks!

From: trinkle@cs.purdue.edu (Daniel Trinkle)

     The error number refers to the errno value listed in
/usr/include/sys/errno.h

#define EACCES 13 /* Permission denied */

     It appears that some process on the local machine is trying to
access (read or write) a file for which it does not have permission.
It could be that some partition is not exported with the necessary
permissions from the server (root and swap partitions must be root
accessible to the appropriate clients). It is also possible that root
on the local machine is trying to modify a remote file in a partition
for which the local machine does not have root access (in which case
the request uid is changed to "nobody" on the server).

>From visti@cs.hut.fi (Hannu Visti)

I got the same message half year ago. It seems to be a "permission denied"-
error, and it occurred because I forgot to put the -root=machine.name
to /etc/exports in the server...



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:14 CDT