SYS V unlink() call

Doug Gwyn gwyn at brl-smoke.ARPA
Tue Feb 18 10:42:48 AEST 1986


> 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.



More information about the Comp.unix.wizards mailing list