1
votes

I've installed Trac .10.5, configured the trac.htpasswd file, and am able to log in and view/create tickets.

The problem is that I am currently unable to administer ticket components such as the versions that appear in the drop list on New Ticket.

From command line, I issued the following command:

trac-admin /foo/bar/trac/ permission add myusername TRAC_ADMIN

User "myusername" is listed in /foo/bar/trac/conf/trac.htpasswd, and I am able to successfully log in with that account.

Is there another step I'm missing in order to get access to a system configuration area? (for instance, setting up version numbers)

EDIT: I discovered that version .10.* and below do not have web admin capabilities installed by default. http://trac.edgewall.org/wiki/WebAdmin

I downloaded the plugin source:

svn export http://svn.edgewall.com/repos/trac/plugins/0.10/webadmin/

Then ran setup.py, which generated a dist/TracWebAdmin-0.1.2dev-py2.6.egg file.

I then issued

easy_install TracWebAdmin-0.1.2dev-py2.6.egg.    

Here's the output:

Processing TracWebAdmin-0.1.2dev-py2.6.egg
removing '/usr/lib/python2.6/site-packages/TracWebAdmin-0.1.2dev-py2.6.egg' (and everything under it)
creating /usr/lib/python2.6/site-packages/TracWebAdmin-0.1.2dev-py2.6.egg
Extracting TracWebAdmin-0.1.2dev-py2.6.egg to /usr/lib/python2.6/site-packages
TracWebAdmin 0.1.2dev is already the active version in easy-install.pth

Installed /usr/lib/python2.6/site-packages/TracWebAdmin-0.1.2dev-py2.6.egg
Processing dependencies for TracWebAdmin==0.1.2dev
Finished processing dependencies for TracWebAdmin==0.1.2dev

My trac/conf/trac.ini file has this section:

[components]
webadmin.* = enabled

I restarted the httpd server (trac uses Apache), and still have no Admin button.

Help greatly appreciated.

2

2 Answers

3
votes

You're a bit too hastily seeking advice. Quoting my recent replies to trac-users mailing-list here:

This is most probably a permission issue and will continue with any more recent Trac environment. Do something like trac-admin permission add TRAC_ADMIN

to grant full permission to an admin user account, that is usable for administration tasks. As known elsewhere, you should create a less privileged account for your regular work to just use Trac.

But please note: Because you've got Python2.6, go for Trac-1.0, don't dare to use anything before this current stable version for a new project, really. Trac-0.10 has been abandoned long ago and 0.11 is unchanged since 2010 too.

You'll have no luck on almost any issue you may encounter, and you miss a truck-load of great features that have been introduced. Trac 0.11 had major API changes in many respects, 0.12 went for full i18n support, if you care for that, and 1.0 is just on the edge, supporting the new db access API as well as retaining compatibility code for not-yet-updated plugins (quite a lot to be honest).

1
votes

I had a similar issue with 0.11.x (minus the plug-in installation), and it turned out that the user account I was logging into via the shell was not the user account that owned the installation. This meant that the changes I was making did not have the right permissions - it is a requirement that all trac-admin changes are made by the installation owner.

Let's say the user that installed Trac was "jim", and I'd logged in as "bob" to use trac-admin in interactive mode. Reapplying a pre-existing permission to a will cause Python to throw an error and kick you off trac-admin. You have to remove the permission first, then reapply it as the other shell user.

The solution was to:

  1. log back in as "bob" via the shell (e.g. "ssh -l bob trac.url.com")

  2. trac-admin path/to/my/project

  3. permission remove TRAC_ADMIN

  4. exit (trac-admin)

  5. exit (ssh)

  6. log in as "jim" via the shell (e.g. "ssh -l jim trac.url.com")

  7. trac-admin path/to/my/project

  8. permission add TRAC_ADMIN

  9. exit (trac-admin)

  10. exit (ssh)

Now when you log into Trac as via a web browser, hopefully you should see the Admin button top right.