Subject: Re: ksh [was: Re: miniroot for NetBSD/i386?]
To: None <port-i386@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-i386
Date: 12/13/2005 15:02:00
> Symlinks permissions are meaningless (except if used as a mask to the
> real permissions of the files).

Symlink permissions do mean something on some systems, and not just as
an additional mask applied to the linked-to objects.  In particular,
since we're talking NetBSD, if the filesystem is mounted with "symperm"
enabled, the read bit on a symlink controls use of readlink() on it and
the execute bit controls whether it can be followed during a path walk.
Neither one affects the read or execute permissions on the pointed-to
object, if any.  (Logically speaking, the write bit should control
replacing the link, eg with symlink(), but symlink() refuses to replace
an existing link at all.)

> File permissions should be preserved and must never be changed by
> file management tools.

Well, except as part of the interface contract of the tools - for
example, chmod's entire raison d'etre involves changing them.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B