Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!adm!oread::barbanis@CS-UMASS.arpa From: "oread::barbanis"@CS-UMASS.arpa Newsgroups: comp.unix.wizards Subject: Re: Bug in Ultrix2.0? Message-ID: <10617@brl-adm.ARPA> Date: Wed, 2-Dec-87 02:02:58 EST Article-I.D.: brl-adm.10617 Posted: Wed Dec 2 02:02:58 1987 Date-Received: Sat, 5-Dec-87 06:45:26 EST Sender: news@brl-adm.ARPA Lines: 17 >>If you are a superuser and do unlink("foo"), it always unlinks, >>even if foo is a directory, and even if this directory is not >>empty. > >This is not a bug. This is a feature. How else are you going to >remove an extra link to a directory when a directory somehow acquires >one (disk glitch, kernel bug, or whatever OK, so I was wrong; unlink(2) is supposed to unlink a (full) directory *if* you are the superuser, and that's the way it works on Ultrix. (It's in the manual, too... :-) ) However, it does not work on Sun Unix 4.2, not even if you are the superuser (no, it is not NFS; I tried it on the server). Unlink returns [EPERM] if you try it on a directory. So what's wrong? George Barbanis UMass -- Amherst