[comp.bugs.sys5] mount permissions bug

jmc@ptsfa.UUCP (Jerry Carlin) (10/14/87)

Is this a bug or a feature? :-)

Symptom: pwd and ls sometimes gave errors in one filesystem (/foo). 

Repeat by: cd /foo; su user-with-different-uid/gid; pwd failed.
	   cd /; same su; cd foo; pwd worked ok.

Also:	from /foo, cd .. did not work.  
	ls -a showed .. but ls -al could not find ./..  
	ls -ld /foo showed mode 755

Solution: 

The file system /foo had mode 755 but the directory /foo that the foo
filesystem was mounted on was mode 770.  All I had to do was umount the
filesystem, chmod 777 the mount point and remount the filesystem.

Moral: Make sure your mount points are mode 777.

This occured on an AT&T 3B5 running UNIX V.2. Your mileage may vary.

-- 
voice: (415) 823-2441	uucp: {ihnp4,lll-crg,ames,qantel,pyramid}!ptsfa!jmc
Where am I? In the village. Whose side are you on? That would be telling.

guy%gorodish@Sun.COM (Guy Harris) (10/14/87)

> Moral: Make sure your mount points are mode 777.

Or r-xr-xr-x, which is what I use to remind myself that the directory in
question is only a mount point.

> This occured on an AT&T 3B5 running UNIX V.2. Your mileage may vary.

Not by much, probably; it happens on most other UNIX systems.
	Guy Harris
	{ihnp4, decvax, seismo, decwrl, ...}!sun!guy
	guy@sun.com

jh@pcsbst.UUCP (10/22/87)

AT&T's Release Notes for System V Release 3.1 say that this
behavior is a bug. It is found in the internal function namei().

For SYS5R3.1 wizzards: this and other problems could be fixed e.g. by
sending an empty string as the last component through namei() and
FS_NAMEI() (concept only!). Be aware what this would cause to RFS!

My Question: Does this behavior bother anybody - shall we fix it ?
At least it seems not to be a security leak.

	Johannes Heuft (PCS)
	unido!pcsbst!jh