Custom Query (332 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (19 - 21 of 332)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Ticket Resolution Summary Owner Reporter
#32 fixed permissions issue, email2trac config bas acgoss@…
Description

I am currently attempting to implement trac on my system which is a CentOS 5 server, running Trac 0.10.4 and the newer email2trac from the svn. I am getting the following errors in my syslog when attempting to send mails via email2trac. When configured using postfix and run_email2trac in the aliases file I get:

TracError?: The user trac requires read _and_ write permission to the database file /var/www/trac/CNSEHelp/db/trac.db and the directory it is located in.

I installed using ./configure --with-trac_user=apache, which corresponds to my apache account.

When configured using postfix and a direct call to email2trac, I get the following error in syslog:

IOError: [Errno 13] Permission denied: '/var/www/trac/CNSEHelp/VERSION'

I have even gone so far as to chmod my trac project's db file and folder to 777 as well as the VERSION file, and in both cases with both the run_email2trac and email2trac calls, I still get the same errors, so I see no conceivable way this could be a security issue.

#34 fixed Have newer seen such a good work before! bas anonymous
Description

Source of this problem is in TicketEmailParser::notify().

Here it tries to set hrefs:

self.env.abs_href = Href(self.get_config('project', 'url'))
self.env.href = Href(self.get_config('project', 'url'))

Unfortunately as of Trac version 0.11 abs_href and href are properties that don't have function for setting value (see http://trac.edgewall.org/browser/trunk/trac/env.py):

href = property(_get_href, 'The application root path')
abs_href = property(_get_abs_href, 'The application URL')

So when trying to set hrefs you get str object is not callable exception. As a workaround I added set functions to above properties. See attached diff.

#35 fixed In trac 0.11 email2trac fails in notify and in ticket_update methods bas andrei2102@…
Description

I started to port this script for trac 0.11 and I founded two errors.

The first is in the notify method and it is described in the #34 ticket. The solution, for me, was to remove the hack.

# create false {abs_}href properties, to trick Notify()
#
self.env.abs_href = Href(self.get_config('project', 'url'))
self.env.href = Href(self.get_config('project', 'url'))

The env members(abs_href and href) don't need to be overwritten.

The second problem was that in ticket_modify method. When saving the modifications made on a ticket it was passed an integer as the modification time.

Traceback (most recent call last):
  File "/home/andrei/workspace/etf/trunk/share/bin/email2trac.py", line 1062, in ?
    tktparser.parse(file('/tmp/tests/tm.eml', 'r'))
  File "/home/andrei/workspace/etf/trunk/share/bin/email2trac.py", line 663, in parse
    if self.ticket_update(m):
  File "/home/andrei/workspace/etf/trunk/share/bin/email2trac.py", line 542, in ticket_update
    tkt.save_changes(self.author, body_text, when)
  File "/home/andrei/workspace/etf/trunk/vendor/trac-0.11dev/trac/ticket/model.py", line 207, in save_changes
    when_ts = to_timestamp(when)
  File "/home/andrei/workspace/etf/trunk/vendor/trac-0.11dev/trac/util/datefmt.py", line 55, in to_timestamp
    diff = dt - _epoc
TypeError: unsupported operand type(s) for -: 'int' and 'datetime.datetime'

In trac 0.11 if the modification time is None then datetime.now() is assumed. So the solution is to send a None.

A patch is attached.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Note: See TracQuery for help on using queries.