Hi,
On Thu, Jul 14, 2016 at 8:11 PM, RjOllos <[email protected]> wrote: > > > On Thursday, July 14, 2016 at 10:55:00 AM UTC-7, Miguel Almeida wrote: >> >> Hi Ryan, >> >> Only now did I have the chance to review this. >> >> I have Trac running in Apache. In apache's trac configuration file the >> PYTHON_EGG_CACHE is defined: >> >> <Location /projects> >> SetHandler mod_python >> PythonInterpreter main_interpreter >> PythonHandler trac.web.modpython_frontend >> PythonOption TracEnvParentDir /srv/trac >> PythonOption TracUriRoot /projects >> PythonOption TracLocale en_GB.UTF8 >> PythonOption PYTHON_EGG_CACHE /srv/trac/egg-cache >> </Location> >> >> However, this doesn't seem to be respected, as a commit creates the log >> [4]. Notice the error says The Python egg cache directory is currently set >> to: /home/svn/.python-egg. >> > > I misled you earlier. You'll need to set the environment variable > PYTHON_EGG_CACHE in your post-commit hook script, as described here: > https://trac.edgewall.org/wiki/TracRepositoryAdmin#ExplicitSync > This is actually already happening: #Trac notification export PYTHON_EGG_CACHE="/srv/trac/egg-cache/" echo "repos: " $REPOS >> /srv/svn/test echo "rev: " $REV >> /srv/svn/test sudo -u www-data trac-admin /srv/trac/iwrs/ changeset added $REPOS $REV sudo -u www-data trac-admin /srv/trac/tools/ changeset added $REPOS $REV sudo -u www-data trac-admin /srv/trac/bibliovigilance/ changeset added $REPOS $REV But the log is still saying the Python egg cache directory is currently set to: /home/svn/.python-eggs This is definitely related with the users running these commands. - From the error log, the user that is seen is svn (so it is searching for the cache in /home/svn/... - svn is running via /usr/bin/svnserve, which is a process - However, as seen above trac-admin should be running with user www-data - I've also tried adding sudo -E (to preserve the environment variables), but apparently this can't be done here (sudo: sorry, you are not allowed to preserve the environment) Still searching for the solution. > > > >> As for "The user must have TICKET_MODIFY" part: authentications are >> completely separate, even though usernames in both places are the same. All >> lowercase. Is this how permission is checked (ie, only by the user's >> string, even though the authentications are in different places)? >> Nevertheless, I believe the setting "commit_ticket_update_check_perms = >> false" should ignore permissions, right? >> >> Since the exception's message is consistent with the code blcok where >> the ticket should be updated >> <https://www.google.com/url?q=https%3A%2F%2Ftrac-hacks.org%2Fbrowser%2Fmultiprojectcommitticketupdaterplugin%2F0.12%2Fmulticommitupdater%2Fcommitupdater.py%23L276&sa=D&sntz=1&usg=AFQjCNHvdKydWWYAr9lg67jlrGge7bkMnA>I >> suspect this permission error is causing the ticket not to update. I'm >> still unsure as to why this is happening though. >> > > It looks like MultiProjectCommitTicketUpdater has a different option. You > could try: > [multicommitupdater] > check_perms = false > > > https://trac-hacks.org/browser/multiprojectcommitticketupdaterplugin/0.12/multicommitupdater/commitupdater.py?marks=167&rev=11453#L147 > Thanks for the tip. I've updated the tool's documentation to indicate this (https://trac-hacks.org/wiki/MultiProjectCommitTicketUpdaterPlugin#Options) > > > - Ryan > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Trac Users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/trac-users/dOkdYT4nRK4/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/trac-users. > For more options, visit https://groups.google.com/d/optout. > -- 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 email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/trac-users. For more options, visit https://groups.google.com/d/optout.
