Mail bug

suitti at CS-Mordred.UUCP suitti at CS-Mordred.UUCP
Thu Dec 1 11:20:13 AEST 1983


When using mail to send to someone on another machine,
I get the following messages:

	pwd: Can't stat directory.: Permission denied
	can't get working directory; will try to continue

Naturally, neither message is in /usr/ucb/mail itself.

	The first line is "pwd", Print Working Directory.  Is your
system new?  Did you recently have your file systems changed?  I ran into
a bug like it, not too long ago.  It has to do with mounting file systems.
A file system is mounted on a directory of another mounted file system.
On my system (2.8 bsd, pdp-11/44), all file systems are mounted on
directories in the root file system.  Once you mount a file system, the
root directory of the file system sort of has two inodes that point to it.
One is the inode in the system root file system, and the other is the
inode for the root directory in the mounted file system.  If the protection
codes are differant, weirdness can happen.  The stat(2) system call, as
implemented in the kernel seems to use the inode in root file system.  Most
other protection references use the protections of the mounted file
system.  "pwd" uses stat(2) to do all of it's work.

How to check if this is the case:
	Bring the system to single user.  Check the protecions (ls -ld)
of the directory on the root file system.  Mount the file systems in
question.  Check the protections again.  Be sure the check owners and
groups as well (ls -ldg).

Solution:
	Just set the owner, group owner, and protections identicle.

Longer term solution:
	New releases could be checked for this inconsistency.  I'd hardly
term it a serious bug.

Stephen Uitti (Purdue physics site manager)
UUCP:		pur-ee!Physics:suitti, purdue!Physics:suitti
INTERNET:	suitti @ pur-phy.UUCP



More information about the Comp.unix.wizards mailing list