SYS V unlink() call

Steven J. McDowall sjm at dayton.UUCP
Thu Feb 13 05:44:41 AEST 1986


Our system (a CRDS Universe/32 w/ Unos 6.1) is based
on Unix V, or to be more precise, is SYS V compatible.

My question is this: In SYSV do you have* to be SU
to unlink directories? I wrote a program that 
unlinks whatever file name is passed to it to 
confirm my ideas, and sure enough, it would not
remove (unlink) a file that is a directory even if
I owned it, and it had write permission. The error 
I get back is EPERM..Looking it up in the good olde
System V Interface Definition Book (Spring 1985 - Issue 1)
on page 143:

	[EPERM]		The named file is a directory and
			the effective user ID of the process
			is not super-user.

Does that mean that to delete *any* directory the program
must be set uid'ed to root? I can't believe that this is
what is really meant here, and it must be some sort of typo.
Could anyone from Bell please clarify this?

Thanks!



-- 
Steven J. McDowall	
Dayton-Hudson Dept. Store. Co.		UUCP: ihnp4!rosevax!dayton!sjm
700 on the Mall				ATT:  1 612 375 2816
Mpls, Mn. 55408



More information about the Comp.unix.wizards mailing list