Sometimes users will lose their permissions when multiple trac projects 
executing on the same apache web service, this issue re-product method as 
below:


   - Open trac project No1
   - Apache site config of No1 (0.png)
   - Open trac project No2 (1.png)
   - Reload two project site page by turns. (2.png)
   - One of the two projects site will occur user no permissions issue. 
   (3.png)



<https://lh5.googleusercontent.com/-pXeXI8kwC0Q/UqylrWpTJ8I/AAAAAAAAAvw/bKsNIUN91OE/s1600/0.png>

<https://lh6.googleusercontent.com/-cSMbfSmEtFk/UqylxwB2e3I/AAAAAAAAAv4/tUPFj6cmvdk/s1600/1.png>

<https://lh6.googleusercontent.com/-dPdh-ebGCpQ/Uqyl5JBxE2I/AAAAAAAAAwA/fn3KwerF7uU/s1600/2.png>

<https://lh5.googleusercontent.com/-5Yta-zqGsj8/Uqyl82P1a0I/AAAAAAAAAwI/p1lELetWrtQ/s1600/3.png>


   - Apache site config of No1
   
/etc/apache2/sites-enabled/trac.conf:

<VirtualHost x.x.x.x:80>

        ServerName x.x.x.x

        DocumentRoot /var/trac/

        WSGIScriptAlias / /var/trac/deploy/cgi-bin/trac.wsgi
        WSGIDaemonProcess trac user=yillkid group=yillkid processes=1 threads=10

        <Directory /var/trac/deploy/cgi-bin>
                WSGIApplicationGroup %{GLOBAL}
                Order deny,allow
                Allow from all
        </Directory>

        ErrorLog "/var/trac/log/errors.log"
        CustomLog "/var/trac/log/accesses.log" common

</VirtualHost>

/var/trac/deploy/cgi-bin/trac.wsgi:

import os

def application(environ, start_request):
    if not 'trac.env_parent_dir' in environ:
        environ.setdefault('trac.env_path', '/var/trac')
    if 'PYTHON_EGG_CACHE' in environ:
        os.environ['PYTHON_EGG_CACHE'] = environ['PYTHON_EGG_CACHE']
    elif 'trac.env_path' in environ:
        os.environ['PYTHON_EGG_CACHE'] = \
            os.path.join(environ['trac.env_path'], '.egg-cache')
    elif 'trac.env_parent_dir' in environ:
        os.environ['PYTHON_EGG_CACHE'] = \
            os.path.join(environ['trac.env_parent_dir'], '.egg-cache')
    from trac.web.main import dispatch_request
    return dispatch_request(environ, start_request)


   
Apache site config of No2

/etc/apache2/sites-enabled/trac2.conf:

<VirtualHost x.x.x.x:80>

        ServerName trac2.x.x.x.x

        DocumentRoot /var/trac2/

        WSGIScriptAlias / /var/trac2/deploy/cgi-bin/trac2.wsgi

        <Directory /var/trac2/deploy/cgi-bin>
                WSGIApplicationGroup %{GLOBAL}
                Order deny,allow
                Allow from all
        </Directory>

        ErrorLog "/var/trac2/log/errors.log"
        CustomLog "/var/trac2/log/accesses.log" common

</VirtualHost>

/var/trac2/deploy/cgi-bin/trac2.wsgi:

import os

def application(environ, start_request):
    if not 'trac.env_parent_dir' in environ:
        environ.setdefault('trac.env_path', '/var/trac2')
    if 'PYTHON_EGG_CACHE' in environ:
        os.environ['PYTHON_EGG_CACHE'] = environ['PYTHON_EGG_CACHE']
    elif 'trac.env_path' in environ:
        os.environ['PYTHON_EGG_CACHE'] = \
            os.path.join(environ['trac.env_path'], '.egg-cache')
    elif 'trac.env_parent_dir' in environ:
        os.environ['PYTHON_EGG_CACHE'] = \
            os.path.join(environ['trac.env_parent_dir'], '.egg-cache')
    from trac.web.main import dispatch_request
    return dispatch_request(environ, start_request)







-- 
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 http://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to