Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Attempting to install Trac on my VPS has been a nightmare. I'm fairly certain that I've got all the necessary files and the system will run if I use the standalone server. However trying to get it set up to be accessible through Apache is proving difficult.

In order to test this I've created a very simple FGCI script, to check where the problem lies. The script is at the url http://trac.1webservices.co.uk/test.fcgi

The directory httpdocs is set to 755, myuser:psaserv The file test.fcgi is set to 755 myuser:psacln (was previously psaserv) Both were created from root SSH so originally root:root

The .htaccess file reads as follows:

<Files *.cgi>
SetHandler fastcgi-script
</Files>

Test.fcgi is as follows

#!/bin/bash
echo 'test'

When I run the script I get a 500 error and the following in my suexec_log file

[2012-03-08 12:17:31]: target uid/gid (10001/506 or 505) mismatch with directory (10001/505) or program (10001/505)
[2012-03-08 12:37:57]: uid: (10001/myuser) gid: (506/506) cmd: test.fcgi

Can anyone suggest anything, or tell me (preferably with a link to some actual instructions rather than the poor docs on Trac's website) an alternative way to get Trac running?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

What's your SuexecUserGroup setting in the httpd.conf file

It sounds like it should be set to the following to match the test.fcgi file ownership:

SuexecUserGroup myuser psacln

share|improve this answer
    
There isn't a line with that in it; should I add it to httpd.conf or one of the .conf files in the conf.d directory? –  M1ke Mar 8 '12 at 14:32
    
Add it to the virtualhost section related to the trac installation. If there isn't a section just for it, add it to the main httpd.conf for now. –  Ewan Leith Mar 8 '12 at 15:07
    
Added that, still get the 500 error. From error_log: [Thu Mar 08 16:16:43 2012] [notice] mod_fcgid: server /var/www/vhosts/1webservices.co.uk/subdomains/trac/httpdocs/test.fcgi(13467) started test [Thu Mar 08 16:16:46 2012] [notice] mod_fcgid: process /var/www/vhosts/1webservices.co.uk/subdomains/trac/httpdocs/test.fcgi(13467) exit(communication error), terminated by calling exit(), return code: 0 However message in suexec_log has changed [2012-03-08 16:16:43]: uid: (10001/myuser) gid: (506/506) cmd: test.fcgi –  M1ke Mar 8 '12 at 16:17
    
OK, so that change did fix it, I just needed to change test.fcgi to echo "hello" >> /tmp/testfile However I get a 404 error from my index.fcgi which contains the code: #!/bin/bash export TRAC_ENV="/usr/share/trac/" exec /usr/share/trac/cgi-bin/trac.fcgi –  M1ke Mar 8 '12 at 18:33
    
Right, had to change the owner of the trac.fcgi file referenced in index.fcgi and it works. All to do with permissions! –  M1ke Mar 8 '12 at 18:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.