Great Circle Associates Majordomo-Workers
(July 1997)

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: Help! I'm Stumped
From: albertv @ spinnewiel . xs4all . nl (Bert Vortman)
Date: Mon, 28 Jul 1997 11:57:00 GMT
To: majordomo-workers @ greatcircle . com
In-reply-to: <> (from Russ McClay <>) (at Sat, 26 Jul 1997 13:44:50 +0800)


>Now, why would the operation not be permitted?  Does anyone have any
>You usually get that message when trying to do something weird, like
>to delete something in /proc or other "just can't do it" errors.
>> I've tried changing the syntax ("unsubscribe" versus "unsubscribe
>> alerts") and sending to the -request address as well as
>> majordomo.  No luck.
>This is repeatable?  Does that file it complains about sit around after
>Majordomo bombs?  Could you tell it what it looks like.
>My only shot in the dark is that it's somehow a link or a directory or
>something, when majordomo assumes it's a file.
>Any help on this would be GREATLY appreciated!
>Please email me directly as I'm not a list member (yet).

I've sent Russ already my reply, here is the solution I found. I had the
same (sort of) problem when porting majordomo to the amiga. I got a 
somewhat different error as Russ did, but I think the reason is the
same. Problem was in the unsubscribe subroutine, around line 450:

	    close(NEW) || &abort("Error closing $listdir/$ $!");
	    if ($match_count == 1) {
		if ((-s "$listdir/$") + $match_length !=
		    (-s "$listdir/$clean_list")) {
		    &abort("Unsubscribe failed: $listdir/$ is wrong length!");
		# we deleted exactly 1 name, so now we shuffle the files
		link("$listdir/$clean_list", "$listdir/$clean_list.old") ||
		    &abort("link(\"$listdir/$clean_list\", \"$listdir/$clean_list.old\"): $!");

#Problem was below, the unlink("$listdir/$clean_list"); unlinked LIST before closing
#it. It is unlinked at the end of the routine, but under amigados this is not possible.
#locking and unlocking a file must be done by the same task that opened it ( in
#this case). Another task (majordomo in this case) can't unlink the file because there 
#stil exist a lock on the file by So, clean_list is not unlinked and
#can't be created (the lock is still with the old clean_list and therefore it caused an error. 

#so by putting the &lclose(LIST); here, everything works again:
#and delete it at the end of the routine!


		link("$listdir/$", "$listdir/$clean_list") ||
		    &abort("link(\"$listdir/$\", \"$listdir/$clean_list\"): $!");
		if (defined $deflist) {
		  print REPLY "Succeeded (from list $deflist).\n";
		elsif ($quietnonmember) {
		  print REPLY "Succeeded (from list $clean_list).\n";
		else {
		  print REPLY "Succeeded.\n";
		&log("unsubscribe $clean_list $subscriber");
		&sendmail(BYE, "$clean_list-approval\@$whereami",
			  "UNSUBSCRIBE $clean_list $subscriber");
		print BYE "$subscriber has unsubscribed from $clean_list.\n";
		print BYE "No action is required on your part.\n";
	    elsif ($match_count == 0) {
		print REPLY "**** No matches found for '$subscriber'\n";
	    else {
		print REPLY "**** FAILED.\n";
	    # deleting &lclose(LIST); here, it's not necessary anymore.
	} else {
	    print STDERR "do_unsubscribe: authorization failed, calling check_and_request.\n" if $DEBUG;
	    &check_and_request("unsubscribe", $clean_list, $subscriber);
    } else {
	&squawk("unsubscribe: unknown list '$list'.");

I don't know if this fix will give any problems under a full unix system, but this
solution works for me, and maybe for Russ too. Maybe something similar is happening
at his system.

Bert Vortman.

Indexed By Date Previous: Help! I'm Stumped
From: Russ McClay <>
Next: Re: Help! I'm Stumped
From: Dave Wolfe <>
Indexed By Thread Previous: Re: Help! I'm Stumped
From: Ruud Sengers <>
Next: Re: Help! I'm Stumped
From: Dave Wolfe <>

Search Internet Search