Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I followed this tutorial in installing Bugzilla, I didn't encounter any problem not until I hit localhost/bugzilla in the URL. My sites-available/default config is as follows:

    #ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    Alias /bugzilla/ /var/www/bugzilla/
    <Directory /var/www/bugzilla>
            AddHandler cgi-script .cgi .pl
            Options +Indexes +ExecCGI +FollowSymLinks
            DirectoryIndex index.cgi
            AllowOverride Limit
    </Directory>
    #<Directory "/usr/lib/cgi-bin">
    #       AllowOverride All
    #       Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    #       Order allow,deny
    #       Allow from all
    #</Directory>

And when tailing at var/log/apache2/error.log

(13)Permission denied: exec of '/var/www/bugzilla/index.cgi' failed

From comments ...

ls -l -rwxr-x--- 1 root apache2 2.6K Feb 20 01:16 /var/www/bugzilla/index.cgi 
share|improve this question
    
What do you mean by show us at least the result of /var/www/bugzilla/index.cgi. How do I know `acl or SELinux? –  fishcracker Apr 24 '13 at 9:26
    
Oh, I get this -rwxr-x--- 1 root apache2 2.6K Feb 20 01:16 /var/www/bugzilla/index.cgi –  fishcracker Apr 24 '13 at 9:49
    
im confused too, so I'll do a chown -R www-data apache2? –  fishcracker Apr 24 '13 at 9:58
    
I believe yes, I have. Because on my apache2.conf it says User www-data & Group www-data (Debian Squeeze) –  fishcracker Apr 24 '13 at 10:00

2 Answers 2

up vote 1 down vote accepted

If you do a

ls -l /var/www/bugzilla/index.cgi

and it shows

ls -l -rwxr-x--- 1 root apache2 2.6K Feb 20 01:16 /var/www/bugzilla/index.cgi 

you will see that the user of the file (root) is not the apache user. Change it to the user you use for Apache. Let's assume this is www-data then ...

sudo chown www-data /var/www/bugzilla/index.cgi

will change this file (and only this file) to user www-data. This will set all files in /var/www/bugzilla/ to user www-data:

sudo chown -R www-data /var/www/bugzilla/

Be careful with that one though: it might change more than you want.

share|improve this answer
    
Why not sudo chown -R www-data /var/www/bugzilla/? –  fishcracker Apr 24 '13 at 10:08
    
If you want that I'll add that ;) –  Rinzwind Apr 24 '13 at 10:12

Make sure you have $webservergroup, and $use_suexec set correctly for your setup in Bugzilla's localconfig file, then run checksetup.pl and it will take care of fixing all of your permissions. If you have root access on the box (which it looks like you do since you can mess with the apache config) then $use_suexec should be 0 and $webservergroup should be "www-data". Make sure you are root when you run checksetup.pl.

share|improve this answer

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.