From: strange@zk3.dec.com (Steve Strange USG)
Subject: Re: Problem with mode on symbolic links
Date: 1996/01/28 [thread overview]
Message-ID: <STRANGE.96Jan28003951@fwasted.dec.com> (raw)
In-Reply-To: 3108CCD8.1546@spirit.com.au
In article <3108CCD8.1546@spirit.com.au> Blair Phillips <Blairp@spirit.com.au> writes:
> In the course of adding some entries to /sbin/rc3.d, I noticed that
> any symbolic links I added had the protection rwxrwxrwx.
>
> chmod og-w or chmod 755 had no effect on this. I tried with umask 0
> as well as the normal umask 022, as I have a vague recollection that
> umask affects chmod.
>
> I noted that most of the standard entries in rc3.d had rwxr-xr-x
> protection, but some of them (e.g. nsr) had rwxrwxrwx.
>
> I'm not sure what security implication this has, but it doesn't do
> anything for my peace of mind.
>
> Can anyone provide enlightenment??
It's the mode bits of the target of the symbolic link that are checked
for file access, not the mode bits of the symlink itself. The
symlink's mode bits are always ignored, so they are always created
with mode 777. I'm not really sure why some of the symlinks in
/sbin/rc3.d ended up with non-777 settings, but there is no reason for
concern because the mode bits are never checked for file accesses
anyway. I just checked a Digital UNIX T4.0 system, and all the
symlinks in /sbin/rc3.d are 777, as they really should be.
The only time the mode bits on a symlink would be potentially
interesting is if you have a dangling symlink (target has been
deleted), and you want to remove the symlink. In that case, you must
be the owner of the symlink (or root) to be able to delete it.
The one exception to symlink mode bits being ignored is DFS mount
points. DFS mount are actually symlinks with a specific mode bit
setting to distinguish them from regular symlinks. But they aren't
used for file access checking in any case.
Steve
--
Steve Strange strange@zk3.dec.com
Digital Equipment Corporation, Nashua, NH (603) 881-0595
Digital UNIX DCE DFS Development
prev parent reply other threads:[~1996-01-28 5:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-01-26 5:00 Problem with mode on symbolic links Blair Phillips
1996-01-28 5:00 ` Steve Strange USG [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox