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 "/usr/lib/cgi-bin">
    #       AllowOverride All
    #       Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    #       Order allow,deny
    #       Allow from all

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

2 Answers 2


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.

  • Why not sudo chown -R www-data /var/www/bugzilla/? Apr 24, 2013 at 10:08
  • If you want that I'll add that ;)
    – Rinzwind
    Apr 24, 2013 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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