#99: Trac reports "Insufficient permissions" when using fine-grained permissions

Solved!
I have a Ubuntu-based Trac installation covering two SVN repositories. Having to share a single Subversion repository with different teams, who shouldn't have access to the other team's code, I had to activate fine-grained permissions using htpasswd and mod_authz_svn on Apache.

I wanted the Trac installation to obey the same access rules. Therefore, in the corresponding repository's trac.ini file, I added a path to the svn access control file using authz_file=/path/to/svn-access . However, upon trying to visit the root source directory using Trac with my administrative user (who should have access to everything), Trac reports "Insufficient permissions to access /".

I double-checked the htpasswd and svn-access file and ensured that the password there matched, and that my administrative user had full read-write (rw) access to the root of the repository. There must be something else wrong.

To activate Trac fine-grained permissions, there are two additional steps required

1
In trac.ini, look for the [trac] section, then set:
authz_file = [path to svn-access] authz_module_name = [repository name or prefix] #...skipped.. permission_policies = AuthzSourcePolicy, DefaultPermissionPolicy, LegacyAttachmentPolicy

Most importantly, you should not forget to set authz_module_name if you used a repository name in svn-access. For example, if your svn-access file looked like:
[vault1:/foo] yliu = rw

then authz_module_name for vault1's corresponding trac.ini should be set to vault1.

References used:

Think you've got a better solution? Help 92049143cabb7ba896d7c06e19906303_small yliu out by posting your solution

TracIni

http://trac.edgewall.org/wiki/TracIni - found by 92049143cabb7ba896d7c06e19906303_small yliu on July 13, 2010, 03:24 AM UTC