From owner-freebsd-hackers Thu Jan 25 11:48:19 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id LAA12486 for hackers-outgoing; Thu, 25 Jan 1996 11:48:19 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id LAA12481 for ; Thu, 25 Jan 1996 11:48:18 -0800 (PST) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id MAA03106; Thu, 25 Jan 1996 12:46:20 -0700 From: Terry Lambert Message-Id: <199601251946.MAA03106@phaeton.artisoft.com> Subject: Re: sticky directory symlinks To: jmacd@CS.Berkeley.EDU (Josh MacDonald) Date: Thu, 25 Jan 1996 12:46:19 -0700 (MST) Cc: freebsd-hackers@FreeBSD.org In-Reply-To: <199601250909.BAA19980@paris.CS.Berkeley.EDU> from "Josh MacDonald" at Jan 25, 96 01:09:28 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.org Precedence: bulk > axis-/tmp % ls -ld . > drwxrwsrwt 4 root wheel 512 Jan 25 00:46 ./ > axis-/tmp % ln -s this sucks > axis-/tmp % ls -l sucks > lrwxrwsrwt 1 root wheel 4 Jan 25 00:46 sucks@ -> this > axis-/tmp % rm sucks > rm: sucks: Operation not permitted > > /tmp is mode 1777 and when I create a symlink I can't remove it. > I notice that the link shares the sticky dirs inode. I think > this is very very bad. I guess that an optimization is made > where the linkname is kept in the directory file instead of > on disk but if its a sticky directory, then I can't remove > something I create. That sucks a lot. Has this been brought > up before? Yes, it has. The change was intentional, and the side effects were known at the time of the change. This is not a "FreeBSD'ism", it's an inheritance from 4.4-Lite, and saves an inode and sizof(frag) at a minimum, per symlink. Consider the overall savings on a large news spool area, and you may even agree that the cost is worth it. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.