Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ttrdc.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!ltuxa!ttrdc!levy From: levy@ttrdc.UUCP (Daniel R. Levy) Newsgroups: net.unix-wizards Subject: Re: SYS V unlink() call Message-ID: <764@ttrdc.UUCP> Date: Fri, 28-Feb-86 22:49:55 EST Article-I.D.: ttrdc.764 Posted: Fri Feb 28 22:49:55 1986 Date-Received: Sat, 1-Mar-86 22:57:56 EST References: <683@dayton.UUCP> <1019@brl-smoke.ARPA> Organization: AT&T, Computer Systems Division, Skokie, IL Lines: 32 In article <1019@brl-smoke.ARPA>, gwyn@brl-smoke.UUCP writes: >> My question is this: In SYSV do you have* to be SU >> to unlink directories? >Yes, insofar as the unlink() system call is concerned. >(Ditto for making links to directories.) This should >be true for any UNIX that does not supply special >directory system calls. >> Does that mean that to delete *any* directory the program >> must be set uid'ed to root? >No, you can always use something like: > system( "rm directory-name" ); >"rm", or a set-UID subprocess "rmdir" that it might >invoke, has the necessary privilege. Surely you mean "rm -r directory-name" or even better "rm -rf directory-name". Just system("rm directory-name") will evince the diagnostic: rm: directory-name directory to stderr. -- ------------------------------- Disclaimer: The views contained herein are | dan levy | yvel nad | my own and are not at all those of my em- | an engihacker @ | ployer or the administrator of any computer | at&t computer systems division | upon which I may hack. | skokie, illinois | -------------------------------- Path: ..!{akgua,homxb,ihnp4,ltuxa,mvuxa, vax135}!ttrdc!levy