[prev in list] [next in list] [prev in thread] [next in thread]
List: rt-users
Subject: [rt-users] [RT 3.6.5RC1] Uninformative 'Permission denied' in log &
From: Boris Lytochkin <boris.lytochkin () e-port ! ru>
Date: 2007-11-30 16:20:21
Message-ID: 673951573.20071130192021 () e-port ! ru
[Download RAW message or body]
Today I faced problem with mail delivery into RT:
[Thu Nov 29 19:39:14 2007] [debug]: Found a ticket ID. It's 105503 \
(/usr/local/rt3/lib/RT/Interface/Email.pm:477)
[Thu Nov 29 19:39:14 2007] [debug]: SpamHeader: Accepting non-spam message. From: was \
bla-bla. \
(/usr/local/rt3/lib/RT/Interface/Email/Filter/SpamHeader.pm:78)
[Thu Nov 29 19:39:14 2007] [crit]: Permission Denied \
(/usr/local/rt3/lib/RT/Interface/Email.pm:243)
[Thu Nov 29 19:39:14 2007] [error]: Could not record email: Message not recorded: \
Permission Denied (/usr/local/rt3/share/html/REST/1.0/NoAuth/mail-gateway:75)
E-mail returned message was not informative too.
So I created patch, adding some kind of debug, i.e.:
diff -aur RT.old/ACE_Overlay.pm RT/ACE_Overlay.pm
--- RT.old/ACE_Overlay.pm Thu May 17 07:11:33 2007
+++ RT/ACE_Overlay.pm Fri Nov 30 17:28:06 2007
@@ -250,13 +250,13 @@
unless ( $self->CurrentUser->HasRight( Object => $args{'Object'},
Right => 'AdminGroup' )
) {
- return ( 0, $self->loc('Permission Denied') );
+ return ( 0, __FILE__.'('.__LINE__.'): '.$self->loc('Permission Denied') \
); }
}
...
patch is very simple:
#!/bin/sh
cd /rt/lib
grep -lR 'Permission Denied' ./| xargs sed -i.bakpd -E \
"s,([$]self->loc\(['\"]Permission Denied['\"]\)),__FILE__.'('.__LINE__.'): '.\1," \
grep -lR '__LINE__' ./ |while read tt; do perl -c $tt; done find ./ -name \*.backpd \
-delete
It's just a crutch, and right variant is to supply human-readable reasons.
(In my case it was: "You have no right to reply to this ticket" \
(/usr/local/rt3/lib/RT/Ticket_Overlay.pm, 2348)
--
Boris Lytochkin,
JSC e-port, Moscow
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:
If you sign up for a new RT support contract before December 31, we'll take
up to 20 percent off the price. This sale won't last long, so get in touch today.
Email us at sales@bestpractical.com or call us at +1 617 812 0745.
Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com
Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic