Edgewall Software

Ticket #1116 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

authz permission problems since [1181]

Reported by: rbrown Owned by: anonymous
Priority: normal Milestone:
Component: general Version: devel
Severity: critical Keywords:
Cc:

Description

Hello,

Having just done an update from our trunk checkout of Trac, we found that the source browser stopped working. The following error was reported:

Trac detected an internal error:

Insufficient permission to view this file (mod_authz_svn)

Python traceback

Traceback (most recent call last):

File "/usr/lib/python2.3/site-packages/trac/core.py", line 533, in cgi_start

real_cgi_start()

File "/usr/lib/python2.3/site-packages/trac/core.py", line 528, in real_cgi_start

dispatch_request(path_info, args, req, env)

File "/usr/lib/python2.3/site-packages/trac/core.py", line 443, in dispatch_request

module.run()

File "/usr/lib/python2.3/site-packages/trac/Module.py", line 41, in run

self.render()

File "/usr/lib/python2.3/site-packages/trac/Browser.py", line 166, in render

self.authzperm.assert_permission (path)

File "/usr/lib/python2.3/site-packages/trac/authzperm.py", line 85, in assert_permission

raise AuthzPermissionError?()

AuthzPermissionError?: Insufficient permission to view this file (mod_authz_svn)

Rolling back trac/authzperm.py to its state prior to changeset 1181 fixed the problem.

Thanks.

Attachments

Change History

Changed 4 years ago by cmlenz

  • owner changed from jonas to utopiste
  • component changed from general to browser
  • milestone set to 0.9

Changed 4 years ago by Matthew Good <trac@…>

  • summary changed from Changeset 1181 broke our source browser to authz permission problems since [1181]

First, please use the Wiki markup so that people can link to the changeset in question: [1181]

Now, it appear that rather than being broken, there's a permissions problem accessing the file. This might be a newly introduced bug, but it might also be an error in your authz file that slipped by in the previous Trac revision.

It would be useful if you posted the authz file and the path that you were trying to access to be able to determine whether it's Trac or your config that needs fixed.

Changed 4 years ago by rbrown

  • component changed from browser to general
  • milestone 0.9 deleted

Sorry about not using the Wiki formatting: I'm normally very strict with myself on such things. :-)

I can't post our authz file because we don't have one. We don't have a need to restrict our codebase on a per-directory basis at present, so we're just using standard http authentication.

In terms of the path I was trying to access, it happened as soon as I clicked on the main Source Browser link in trac, so I was trying to view the repository root.

Thanks.

Changed 4 years ago by Juanma Barranquero

I'm getting the very exact same problem, except that my traceback starts with:

Traceback (most recent call last):
  File "C:\bin\python\lib\site-packages\trac\ModPythonHandler.py", line 194, in handler
    core.dispatch_request(mpr.path_info, args, mpr, env)
  File "C:\bin\python\lib\site-packages\trac\core.py", line 443, in dispatch_request
    module.run()

because I'm using ModPython.

I have an authzsvn file, but it contains:

[/]
* = r

which is not restricted in any subsequent rule. There's no problem accessing the repository in read-only mode with the command-line Subversion tools nor with TortoiseSvn.

Reverting [1181] "fixes" the problem, as expected.

Changed 4 years ago by utopiste

  • owner changed from utopiste to anonymous
  • status changed from new to assigned

The fixes sould be in the repository this week, sorry for the exception

Changed 4 years ago by utopiste

  • status changed from assigned to closed
  • resolution set to fixed

fixed by [1183] and [1184]

Changed 4 years ago by anonymous

  • status changed from closed to reopened
  • resolution fixed deleted

The problem is not fixed completly. I can click on the "Browse Source" tab and I get the root directory of my repository. But as soon as a click on a sub-directory the same permission error occurs.

Changed 4 years ago by cmlenz

Please make sure you're not seeing a cached version of the page (Trac will only retransmit if the directory contents changed). Use Shift-Reload to invalidate the cache.

(The fix works here BTW)

Changed 4 years ago by anonymous

  • status changed from reopened to closed
  • resolution set to fixed

Clearing the cache did not work, but restarting the web server seems to have done the job.

Changed 4 years ago by anonymous

Thanks, that's worked like a charm.

Add/Change #1116 (authz permission problems since [1181])

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from anonymous. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.