Symbolic link

der Mouse mouse at thunder.mcrcim.mcgill.edu
Fri May 24 20:31:51 AEST 1991


In article <9105200532.AA27396 at csufres.CSUFresno.EDU>, quang at CSUFRES.CSUFRESNO.EDU (Quang Ngo) writes:

> I have a simple question:

> If someone were to make a symbolic link to my account (if I
> accidentally left it opened), then how do I know?  How would I remove
> it?

The question doesn't really make much sense.  By "to [your] account",
you presumably mean to one of your directories.  I'm not sure what you
mean by leaving it "open[ed]", but I assume this means with some of the
world access bits turned on.

The only permissions involved when creating a symbolic link are those
on the directory in which the link resides.  The place the link points
to does not need to have any permission bits turned on; in fact, it
need not even exist.  So anyone can create a symbolic link pointing to
any of your directories at any time, regardless of how you have your
permission bits set.

So, why isn't this a huge security hole?  Because the permissions are
checked when the link is used, of course.

How would you know?  You wouldn't.  You'd have to search the entire
filesystem, and to do a thorough job of it you'd have to be super-user.
But it doesn't really matter because if you turn off the permission
bits your stuff is inaccessible even if the link does exist.

How would you remove it?  Again, you generally wouldn't.  You'd need to
be able to remove stuff from the directory the link is in, which you
presumably wouldn't have.  But again, it really doesn't much matter.

					der Mouse

			old: mcgill-vision!mouse
			new: mouse at larry.mcrcim.mcgill.edu



More information about the Comp.unix.questions mailing list