Re: [Trac] Forbidden error after Trac instance logoff | Trac 1.6

Venu Pillai <[email protected]> Thu, 26 Feb 2026 00:14:57 -0800 (PST)
Newsgroups gmane.comp.version-control.subversion.trac.general
Message-ID <[email protected]>
------=_Part_943144_641990586.1772093697843
Content-Type: multipart/alternative; 
	boundary="----=_Part_943145_1188335432.1772093697843"

------=_Part_943145_1188335432.1772093697843
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Added the entry in trac.ini
+permission_policies =3D AuthzPolicy, DefaultWikiPolicy, DefaultTicketPolic=
y,=20
DefaultPermissionPolicy, DefaultPermissionPolicy,LegacyAttachmentPolicy
Restarted the service
Still the same issue.

 If a user doesn't have permission to see the home page (WIKI_VIEW...),=20
Trac will send a "Permission Denied" page and ask to log in. (Which is in=
=20
my case) .
How to redirect the home page to Login page?


Below are the logs captured when I enter the URL to access the trac=20
instance home page example "https://xxxx.xxx.xx/rgxxx=20
=20
tail -f trac.log
2026-02-26 12:55:07,075 Trac[perm] DEBUG: AuthzPolicy denies anonymous=20
performing TICKET_ADMIN on <Resource 'admin:ticket/type'>
2026-02-26 12:55:07,076 Trac[authz_policy] DEBUG: Checking REPORT_VIEW on=
=20
report:-1@*
2026-02-26 12:55:07,076 Trac[authz_policy] DEBUG: report:-1@* matched=20
section *@* for user anonymous
2026-02-26 12:55:07,076 Trac[perm] DEBUG: AuthzPolicy denies anonymous=20
performing REPORT_VIEW on <Resource 'report:-1'>
2026-02-26 12:55:07,076 Trac[authz_policy] DEBUG: Checking TIMELINE_VIEW on=
=20
timeline:*@*
2026-02-26 12:55:07,076 Trac[authz_policy] DEBUG: timeline:*@* matched=20
section *@* for user anonymous
2026-02-26 12:55:07,076 Trac[perm] DEBUG: AuthzPolicy denies anonymous=20
performing TIMELINE_VIEW on <Resource 'timeline'>
2026-02-26 12:55:07,076 Trac[authz_policy] DEBUG: Checking WIKI_VIEW on=20
wiki:TracGuide@*
2026-02-26 12:55:07,076 Trac[authz_policy] DEBUG: wiki:TracGuide@* matched=
=20
section *@* for user anonymous
2026-02-26 12:55:07,076 Trac[perm] DEBUG: AuthzPolicy denies anonymous=20
performing WIKI_VIEW on <Resource 'wiki:TracGuide'>

On Wednesday, 25 February 2026 at 23:07:14 UTC+5:30 Jun Omae wrote:

> On Wed, Feb 25, 2026 at 7:28=E2=80=AFPM Venu Pillai <[email protected]> =
wrote:
> >
> > Copied the .py file in below path
> >
> > #ls /usr/local/lib/python3.12/site-packages/tracopt/perm
> >
> > authz_policy.py authz_policy.py.old config_perm_provider.py __init__.py=
=20
> __pycache__
>
> No. Add AuthzPolicy to [trac] permission_policies option in your trac.ini=
.
>
> --- trac.ini.orig 2026-02-26 02:32:37.714671800 +0900
> +++ trac.ini 2026-02-26 02:33:20.442061500 +0900
> @@ -320,7 +320,7 @@
> mysqldump_path =3D mysqldump
> never_obfuscate_mailto =3D disabled
> #permission_policies =3D
> DefaultPermissionPolicy,LegacyAttachmentPolicy,AuthzSourcePolicy
> -permission_policies =3D AuthzSourcePolicy, DefaultPermissionPolicy,
> LegacyAttachmentPolicy
> +permission_policies =3D
>
> AuthzPolicy,AuthzSourcePolicy,DefaultWikiPolicy,DefaultTicketPolicy,Defau=
ltPermissionPolicy,LegacyAttachmentPolicy
> pg_dump_path =3D pg_dump
> resizable_textareas =3D enabled
> secure_cookies =3D disabled
>
>
>
> > Restarted the service
> >
> >
> >
> > Same issue.
> >
> > I am attaching the Trac.ini and debug file
> >
> >
> > On Wednesday, 25 February 2026 at 13:07:46 UTC+5:30 Jun Omae wrote:
> >>
> >> > Added the permission_policies =3D=20
> AuthzSourcePolicy,DefaultWikiPolicy,DefaultTicketPolicy,DefaultPermission=
Policy,LegacyAttachmentPolicy=20
> in Trac.ini
> >>
> >> AuthzPolicy should be added.
> >> See=20
> https://trac.edgewall.org/intertrac/source:/branches/1.6-stable/tracopt/p=
erm/authz_policy.py
> >>
> >> If not fixed yet, please share entire of your trac.ini and trac.log
> >> after enabling logging with DEBUG level and reproducing it.
> >>
> >> On Wed, Feb 25, 2026 at 2:46=E2=80=AFPM Venu Pillai <[email protected]=
m> wrote:
> >> >
> >> > Hi chris,
> >> > Added the permission_policies =3D=20
> AuthzSourcePolicy,DefaultWikiPolicy,DefaultTicketPolicy,DefaultPermission=
Policy,LegacyAttachmentPolicy=20
> in Trac.ini
> >> > Restarted the service.
> >> > Still the same issue. I can successfully login to trac instance=20
> create ticket, view ticket etc. After logout it should go back to login=
=20
> page? but here after logoff it give forbidden error depend upon that last=
 I=20
> h
> >> > I have attached the error.
> >>
> >>
> >> --
> >> Jun Omae <[email protected]> (=E5=A4=A7=E5=89=8D =E6=BD=A4)
> >
> > --
> > You received this message because you are subscribed to the Google=20
> Groups "Trac Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send=
=20
> an email to trac-users+...-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
> > To view this discussion visit=20
> https://groups.google.com/d/msgid/trac-users/04c3efe9-c305-46e2-82f3-dbb9=
a3bbe17cn%40googlegroups.com
> .
>
>
>
> --=20
> Jun Omae <[email protected]> (=E5=A4=A7=E5=89=8D =E6=BD=A4)
>

--=20
You received this message because you are subscribed to the Google Groups "=
Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to trac-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
To view this discussion visit https://groups.google.com/d/msgid/trac-users/=
a1fe3907-af33-4e55-865e-a2531c90ab57n%40googlegroups.com.

------=_Part_943145_1188335432.1772093697843
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div>Added the entry in trac.ini</div><div>+permission_policies =3D AuthzPo=
licy, DefaultWikiPolicy, DefaultTicketPolicy, DefaultPermissionPolicy, Defa=
ultPermissionPolicy,LegacyAttachmentPolicy</div><div>Restarted the service<=
/div><div>Still the same issue.</div><div><br /></div><div>=C2=A0If a user =
doesn't have permission to see the home page (WIKI_VIEW...), Trac will send=
 a "Permission Denied" page and ask to log in. (Which is in my case) .</div=
><div>How to redirect the home page to Login page?</div><div><br /></div><d=
iv><br /></div><div>Below are the logs captured when I enter the URL to acc=
ess the trac instance home page example "https://xxxx.xxx.xx/rgxxx=C2=A0</d=
iv><div>=C2=A0</div>tail -f trac.log<br />2026-02-26 12:55:07,075 Trac[perm=
] DEBUG: AuthzPolicy denies anonymous performing TICKET_ADMIN on &lt;Resour=
ce 'admin:ticket/type'&gt;<br />2026-02-26 12:55:07,076 Trac[authz_policy] =
DEBUG: Checking REPORT_VIEW on report:-1@*<br />2026-02-26 12:55:07,076 Tra=
c[authz_policy] DEBUG: report:-1@* matched section *@* for user anonymous<b=
r />2026-02-26 12:55:07,076 Trac[perm] DEBUG: AuthzPolicy denies anonymous =
performing REPORT_VIEW on &lt;Resource 'report:-1'&gt;<br />2026-02-26 12:5=
5:07,076 Trac[authz_policy] DEBUG: Checking TIMELINE_VIEW on timeline:*@*<b=
r />2026-02-26 12:55:07,076 Trac[authz_policy] DEBUG: timeline:*@* matched =
section *@* for user anonymous<br />2026-02-26 12:55:07,076 Trac[perm] DEBU=
G: AuthzPolicy denies anonymous performing TIMELINE_VIEW on &lt;Resource 't=
imeline'&gt;<br />2026-02-26 12:55:07,076 Trac[authz_policy] DEBUG: Checkin=
g WIKI_VIEW on wiki:TracGuide@*<br />2026-02-26 12:55:07,076 Trac[authz_pol=
icy] DEBUG: wiki:TracGuide@* matched section *@* for user anonymous<br />20=
26-02-26 12:55:07,076 Trac[perm] DEBUG: AuthzPolicy denies anonymous perfor=
ming WIKI_VIEW on &lt;Resource 'wiki:TracGuide'&gt;<br /><br /><div class=
=3D"gmail_quote"><div dir=3D"auto" class=3D"gmail_attr">On Wednesday, 25 Fe=
bruary 2026 at 23:07:14 UTC+5:30 Jun Omae wrote:<br/></div><blockquote clas=
s=3D"gmail_quote" style=3D"margin: 0 0 0 0.8ex; border-left: 1px solid rgb(=
204, 204, 204); padding-left: 1ex;">On Wed, Feb 25, 2026 at 7:28=E2=80=AFPM=
 Venu Pillai &lt;<a href data-email-masked rel=3D"nofollow">vpill...@gmail.=
com</a>&gt; wrote:
<br>&gt;
<br>&gt; Copied the .py file in below path
<br>&gt;
<br>&gt; #ls /usr/local/lib/python3.12/site-packages/tracopt/perm
<br>&gt;
<br>&gt; authz_policy.py  authz_policy.py.old  config_perm_provider.py  __i=
nit__.py  __pycache__
<br>
<br>No. Add AuthzPolicy to [trac] permission_policies option in your trac.i=
ni.
<br>
<br>--- trac.ini.orig       2026-02-26 02:32:37.714671800 +0900
<br>+++ trac.ini    2026-02-26 02:33:20.442061500 +0900
<br>@@ -320,7 +320,7 @@
<br> mysqldump_path =3D mysqldump
<br> never_obfuscate_mailto =3D disabled
<br> #permission_policies =3D
<br>DefaultPermissionPolicy,LegacyAttachmentPolicy,AuthzSourcePolicy
<br>-permission_policies =3D AuthzSourcePolicy, DefaultPermissionPolicy,
<br>LegacyAttachmentPolicy
<br>+permission_policies =3D
<br>AuthzPolicy,AuthzSourcePolicy,DefaultWikiPolicy,DefaultTicketPolicy,Def=
aultPermissionPolicy,LegacyAttachmentPolicy
<br> pg_dump_path =3D pg_dump
<br> resizable_textareas =3D enabled
<br> secure_cookies =3D disabled
<br>
<br>
<br>
<br>&gt; Restarted the service
<br>&gt;
<br>&gt;
<br>&gt;
<br>&gt; Same issue.
<br>&gt;
<br>&gt; I am attaching the Trac.ini and debug file
<br>&gt;
<br>&gt;
<br>&gt; On Wednesday, 25 February 2026 at 13:07:46 UTC+5:30 Jun Omae wrote=
:
<br>&gt;&gt;
<br>&gt;&gt; &gt; Added the permission_policies =3D AuthzSourcePolicy,Defau=
ltWikiPolicy,DefaultTicketPolicy,DefaultPermissionPolicy,LegacyAttachmentPo=
licy in Trac.ini
<br>&gt;&gt;
<br>&gt;&gt; AuthzPolicy should be added.
<br>&gt;&gt; See <a href=3D"https://trac.edgewall.org/intertrac/source:/bra=
nches/1.6-stable/tracopt/perm/authz_policy.py" target=3D"_blank" rel=3D"nof=
ollow" data-saferedirecturl=3D"https://www.google.com/url?hl=3Den-GB&amp;q=
=3Dhttps://trac.edgewall.org/intertrac/source:/branches/1.6-stable/tracopt/=
perm/authz_policy.py&amp;source=3Dgmail&amp;ust=3D1772171625224000&amp;usg=
=3DAOvVaw00QuuWrlKSCHdeyX6V17jx">https://trac.edgewall.org/intertrac/source=
:/branches/1.6-stable/tracopt/perm/authz_policy.py</a>
<br>&gt;&gt;
<br>&gt;&gt; If not fixed yet, please share entire of your trac.ini and tra=
c.log
<br>&gt;&gt; after enabling logging with DEBUG level and reproducing it.
<br>&gt;&gt;
<br>&gt;&gt; On Wed, Feb 25, 2026 at 2:46=E2=80=AFPM Venu Pillai &lt;<a hre=
f data-email-masked rel=3D"nofollow">[email protected]</a>&gt; wrote:
<br>&gt;&gt; &gt;
<br>&gt;&gt; &gt; Hi chris,
<br>&gt;&gt; &gt; Added the permission_policies =3D AuthzSourcePolicy,Defau=
ltWikiPolicy,DefaultTicketPolicy,DefaultPermissionPolicy,LegacyAttachmentPo=
licy in Trac.ini
<br>&gt;&gt; &gt; Restarted the service.
<br>&gt;&gt; &gt; Still the same issue. I can successfully login to trac in=
stance create ticket, view ticket etc. After logout it should go back to lo=
gin page? but here after logoff it give forbidden error depend upon that la=
st I h
<br>&gt;&gt; &gt; I have attached the error.
<br>&gt;&gt;
<br>&gt;&gt;
<br>&gt;&gt; --
<br>&gt;&gt; Jun Omae &lt;<a href data-email-masked rel=3D"nofollow">jun...=
@gmail.com</a>&gt; (=E5=A4=A7=E5=89=8D =E6=BD=A4)
<br>&gt;
<br>&gt; --
<br>&gt; You received this message because you are subscribed to the Google=
 Groups &quot;Trac Users&quot; group.
<br>&gt; To unsubscribe from this group and stop receiving emails from it, =
send an email to <a href data-email-masked rel=3D"nofollow">trac-users+...@=
googlegroups.com</a>.
<br>&gt; To view this discussion visit <a href=3D"https://groups.google.com=
/d/msgid/trac-users/04c3efe9-c305-46e2-82f3-dbb9a3bbe17cn%40googlegroups.co=
m" target=3D"_blank" rel=3D"nofollow" data-saferedirecturl=3D"https://www.g=
oogle.com/url?hl=3Den-GB&amp;q=3Dhttps://groups.google.com/d/msgid/trac-use=
rs/04c3efe9-c305-46e2-82f3-dbb9a3bbe17cn%2540googlegroups.com&amp;source=3D=
gmail&amp;ust=3D1772171625224000&amp;usg=3DAOvVaw074m-AWH9MYOUspKprgZBk">ht=
tps://groups.google.com/d/msgid/trac-users/04c3efe9-c305-46e2-82f3-dbb9a3bb=
e17cn%40googlegroups.com</a>.
<br>
<br>
<br>
<br>--=20
<br>Jun Omae &lt;<a href data-email-masked rel=3D"nofollow">[email protected]=
m</a>&gt; (=E5=A4=A7=E5=89=8D =E6=BD=A4)
<br></blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;Trac Users&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:trac-users+unsubscribe-/[email protected]">trac-use=
rs+unsubscribe-/[email protected]</a>.<br />
To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/=
trac-users/a1fe3907-af33-4e55-865e-a2531c90ab57n%40googlegroups.com?utm_med=
ium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/trac-use=
rs/a1fe3907-af33-4e55-865e-a2531c90ab57n%40googlegroups.com</a>.<br />

------=_Part_943145_1188335432.1772093697843--

------=_Part_943144_641990586.1772093697843--