Forbidden You don't have permission to access /phpmyadmin on this server












6














I installed php, mysql, phpmyadmin on my Ubuntu 12.04 localhost in the following steps:



I try these steps:



sudo apt-get install apache2
sudo /etc/init.d/apache2 restart
sudo apt-get install php5 libapache2-mod-php5
sudo apt-get install php5-cli
sudo apt-get install php5-cgi
sudo apt-get install php5-mysql
sudo apt-get install php5-pgsql
sudo /etc/init.d/apache2 restart


than after i faced phpmyadmin not found error and fixed using the following answer



How to solve the phpmyadmin not found issue after upgrading php and apache?



After applying that fix I got another error message:



Forbidden  You don't have permission to access /phpmyadmin on this server.


How can fix this?










share|improve this question
























  • Change the permission with sudo chown -R $USER:$USER /var/www/ and sudo chmod -R 755 /var/www
    – Achu
    Sep 19 '14 at 11:06
















6














I installed php, mysql, phpmyadmin on my Ubuntu 12.04 localhost in the following steps:



I try these steps:



sudo apt-get install apache2
sudo /etc/init.d/apache2 restart
sudo apt-get install php5 libapache2-mod-php5
sudo apt-get install php5-cli
sudo apt-get install php5-cgi
sudo apt-get install php5-mysql
sudo apt-get install php5-pgsql
sudo /etc/init.d/apache2 restart


than after i faced phpmyadmin not found error and fixed using the following answer



How to solve the phpmyadmin not found issue after upgrading php and apache?



After applying that fix I got another error message:



Forbidden  You don't have permission to access /phpmyadmin on this server.


How can fix this?










share|improve this question
























  • Change the permission with sudo chown -R $USER:$USER /var/www/ and sudo chmod -R 755 /var/www
    – Achu
    Sep 19 '14 at 11:06














6












6








6







I installed php, mysql, phpmyadmin on my Ubuntu 12.04 localhost in the following steps:



I try these steps:



sudo apt-get install apache2
sudo /etc/init.d/apache2 restart
sudo apt-get install php5 libapache2-mod-php5
sudo apt-get install php5-cli
sudo apt-get install php5-cgi
sudo apt-get install php5-mysql
sudo apt-get install php5-pgsql
sudo /etc/init.d/apache2 restart


than after i faced phpmyadmin not found error and fixed using the following answer



How to solve the phpmyadmin not found issue after upgrading php and apache?



After applying that fix I got another error message:



Forbidden  You don't have permission to access /phpmyadmin on this server.


How can fix this?










share|improve this question















I installed php, mysql, phpmyadmin on my Ubuntu 12.04 localhost in the following steps:



I try these steps:



sudo apt-get install apache2
sudo /etc/init.d/apache2 restart
sudo apt-get install php5 libapache2-mod-php5
sudo apt-get install php5-cli
sudo apt-get install php5-cgi
sudo apt-get install php5-mysql
sudo apt-get install php5-pgsql
sudo /etc/init.d/apache2 restart


than after i faced phpmyadmin not found error and fixed using the following answer



How to solve the phpmyadmin not found issue after upgrading php and apache?



After applying that fix I got another error message:



Forbidden  You don't have permission to access /phpmyadmin on this server.


How can fix this?







permissions apache2 php mysql phpmyadmin






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 13 '17 at 12:23









Community

1




1










asked Sep 19 '14 at 10:45









Kamlesh

231128




231128












  • Change the permission with sudo chown -R $USER:$USER /var/www/ and sudo chmod -R 755 /var/www
    – Achu
    Sep 19 '14 at 11:06


















  • Change the permission with sudo chown -R $USER:$USER /var/www/ and sudo chmod -R 755 /var/www
    – Achu
    Sep 19 '14 at 11:06
















Change the permission with sudo chown -R $USER:$USER /var/www/ and sudo chmod -R 755 /var/www
– Achu
Sep 19 '14 at 11:06




Change the permission with sudo chown -R $USER:$USER /var/www/ and sudo chmod -R 755 /var/www
– Achu
Sep 19 '14 at 11:06










4 Answers
4






active

oldest

votes


















8














It solved :



sudo apt-get install mysql-server
sudo dpkg-reconfigure phpmyadmin
sudo service apache2 restart





share|improve this answer





























    5














    You need to change the permission with:



    sudo chown -R $USER:$USER /var/www/  
    sudo chmod -R 755 /var/www





    share|improve this answer





























      2
















      1. You should check /etc/apache2 and find the below lines:



        <Directory /usr/share>
        AllowOverride None
        Require all granted
        </Directory>



      2. the apache2 config should have this line:



        Include /etc/phpmyadmin/apache.conf



      3. Be you you phpadmin config look like this:



        Alias /phpmyadmin /usr/share/phpmyadmin

        <Directory /usr/share/phpmyadmin>
        Options FollowSymLinks
        DirectoryIndex index.php

        <IfModule mod_php5.c>
        AddType application/x-httpd-php .php

        php_flag magic_quotes_gpc Off
        php_flag track_vars On
        php_flag register_globals Off
        php_admin_flag allow_url_fopen Off
        php_value include_path .
        php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
        php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/javascript/
        </IfModule>
        </Directory>

        <Directory /usr/share/phpmyadmin/setup>
        <IfModule mod_authn_file.c>
        AuthType Basic
        AuthName "phpMyAdmin Setup"
        AuthUserFile /etc/phpmyadmin/htpasswd.setup
        </IfModule>
        Require valid-user
        </Directory>

        <Directory /usr/share/phpmyadmin/libraries>
        Order Deny,Allow
        Deny from All
        </Directory>

        <Directory /usr/share/phpmyadmin/setup/lib>
        Order Deny,Allow
        Deny from All
        </Directory>







      share|improve this answer































        -1














        This worked for me in centos
        removing unnecessary backup files of configuration



        [root@Stats-Server-1 etc]# cd httpd/



        [root@Stats-Server-1 httpd]# ls
        conf conf.d conf.modules.d logs modules run



        [root@Stats-Server-1 httpd]# sudo nano conf.d



        [root@Stats-Server-1 httpd]# cd conf.d



        [root@Stats-Server-1 conf.d]# ls



        autoindex.conf phpMyAdminbk.conf phpMyAdmin.conf.rpmsave userdir.conf
        php.conf phpMyAdmin.conf README welcome.conf



        [root@Stats-Server-1 conf.d]# rm -rf phpMyAdminbk.conf



        [root@Stats-Server-1 conf.d]# rm -rf phpMyAdmin.conf.rpmsave



        [root@Stats-Server-1 conf.d]# sudo systemctl restart httpd.service






        share|improve this answer





















        • none of these commands have anything whatsoever to do with permissions that I can see.
          – Elder Geek
          Feb 5 '18 at 18:58











        Your Answer








        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "89"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled) {
        StackExchange.using("snippets", function() {
        createEditor();
        });
        }
        else {
        createEditor();
        }
        });

        function createEditor() {
        StackExchange.prepareEditor({
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        });


        }
        });














        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f525976%2fforbidden-you-dont-have-permission-to-access-phpmyadmin-on-this-server%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        4 Answers
        4






        active

        oldest

        votes








        4 Answers
        4






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        8














        It solved :



        sudo apt-get install mysql-server
        sudo dpkg-reconfigure phpmyadmin
        sudo service apache2 restart





        share|improve this answer


























          8














          It solved :



          sudo apt-get install mysql-server
          sudo dpkg-reconfigure phpmyadmin
          sudo service apache2 restart





          share|improve this answer
























            8












            8








            8






            It solved :



            sudo apt-get install mysql-server
            sudo dpkg-reconfigure phpmyadmin
            sudo service apache2 restart





            share|improve this answer












            It solved :



            sudo apt-get install mysql-server
            sudo dpkg-reconfigure phpmyadmin
            sudo service apache2 restart






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Sep 19 '14 at 11:59









            Kamlesh

            231128




            231128

























                5














                You need to change the permission with:



                sudo chown -R $USER:$USER /var/www/  
                sudo chmod -R 755 /var/www





                share|improve this answer


























                  5














                  You need to change the permission with:



                  sudo chown -R $USER:$USER /var/www/  
                  sudo chmod -R 755 /var/www





                  share|improve this answer
























                    5












                    5








                    5






                    You need to change the permission with:



                    sudo chown -R $USER:$USER /var/www/  
                    sudo chmod -R 755 /var/www





                    share|improve this answer












                    You need to change the permission with:



                    sudo chown -R $USER:$USER /var/www/  
                    sudo chmod -R 755 /var/www






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Sep 19 '14 at 11:07









                    Achu

                    15.8k136298




                    15.8k136298























                        2
















                        1. You should check /etc/apache2 and find the below lines:



                          <Directory /usr/share>
                          AllowOverride None
                          Require all granted
                          </Directory>



                        2. the apache2 config should have this line:



                          Include /etc/phpmyadmin/apache.conf



                        3. Be you you phpadmin config look like this:



                          Alias /phpmyadmin /usr/share/phpmyadmin

                          <Directory /usr/share/phpmyadmin>
                          Options FollowSymLinks
                          DirectoryIndex index.php

                          <IfModule mod_php5.c>
                          AddType application/x-httpd-php .php

                          php_flag magic_quotes_gpc Off
                          php_flag track_vars On
                          php_flag register_globals Off
                          php_admin_flag allow_url_fopen Off
                          php_value include_path .
                          php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
                          php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/javascript/
                          </IfModule>
                          </Directory>

                          <Directory /usr/share/phpmyadmin/setup>
                          <IfModule mod_authn_file.c>
                          AuthType Basic
                          AuthName "phpMyAdmin Setup"
                          AuthUserFile /etc/phpmyadmin/htpasswd.setup
                          </IfModule>
                          Require valid-user
                          </Directory>

                          <Directory /usr/share/phpmyadmin/libraries>
                          Order Deny,Allow
                          Deny from All
                          </Directory>

                          <Directory /usr/share/phpmyadmin/setup/lib>
                          Order Deny,Allow
                          Deny from All
                          </Directory>







                        share|improve this answer




























                          2
















                          1. You should check /etc/apache2 and find the below lines:



                            <Directory /usr/share>
                            AllowOverride None
                            Require all granted
                            </Directory>



                          2. the apache2 config should have this line:



                            Include /etc/phpmyadmin/apache.conf



                          3. Be you you phpadmin config look like this:



                            Alias /phpmyadmin /usr/share/phpmyadmin

                            <Directory /usr/share/phpmyadmin>
                            Options FollowSymLinks
                            DirectoryIndex index.php

                            <IfModule mod_php5.c>
                            AddType application/x-httpd-php .php

                            php_flag magic_quotes_gpc Off
                            php_flag track_vars On
                            php_flag register_globals Off
                            php_admin_flag allow_url_fopen Off
                            php_value include_path .
                            php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
                            php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/javascript/
                            </IfModule>
                            </Directory>

                            <Directory /usr/share/phpmyadmin/setup>
                            <IfModule mod_authn_file.c>
                            AuthType Basic
                            AuthName "phpMyAdmin Setup"
                            AuthUserFile /etc/phpmyadmin/htpasswd.setup
                            </IfModule>
                            Require valid-user
                            </Directory>

                            <Directory /usr/share/phpmyadmin/libraries>
                            Order Deny,Allow
                            Deny from All
                            </Directory>

                            <Directory /usr/share/phpmyadmin/setup/lib>
                            Order Deny,Allow
                            Deny from All
                            </Directory>







                          share|improve this answer


























                            2












                            2








                            2








                            1. You should check /etc/apache2 and find the below lines:



                              <Directory /usr/share>
                              AllowOverride None
                              Require all granted
                              </Directory>



                            2. the apache2 config should have this line:



                              Include /etc/phpmyadmin/apache.conf



                            3. Be you you phpadmin config look like this:



                              Alias /phpmyadmin /usr/share/phpmyadmin

                              <Directory /usr/share/phpmyadmin>
                              Options FollowSymLinks
                              DirectoryIndex index.php

                              <IfModule mod_php5.c>
                              AddType application/x-httpd-php .php

                              php_flag magic_quotes_gpc Off
                              php_flag track_vars On
                              php_flag register_globals Off
                              php_admin_flag allow_url_fopen Off
                              php_value include_path .
                              php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
                              php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/javascript/
                              </IfModule>
                              </Directory>

                              <Directory /usr/share/phpmyadmin/setup>
                              <IfModule mod_authn_file.c>
                              AuthType Basic
                              AuthName "phpMyAdmin Setup"
                              AuthUserFile /etc/phpmyadmin/htpasswd.setup
                              </IfModule>
                              Require valid-user
                              </Directory>

                              <Directory /usr/share/phpmyadmin/libraries>
                              Order Deny,Allow
                              Deny from All
                              </Directory>

                              <Directory /usr/share/phpmyadmin/setup/lib>
                              Order Deny,Allow
                              Deny from All
                              </Directory>







                            share|improve this answer
















                            1. You should check /etc/apache2 and find the below lines:



                              <Directory /usr/share>
                              AllowOverride None
                              Require all granted
                              </Directory>



                            2. the apache2 config should have this line:



                              Include /etc/phpmyadmin/apache.conf



                            3. Be you you phpadmin config look like this:



                              Alias /phpmyadmin /usr/share/phpmyadmin

                              <Directory /usr/share/phpmyadmin>
                              Options FollowSymLinks
                              DirectoryIndex index.php

                              <IfModule mod_php5.c>
                              AddType application/x-httpd-php .php

                              php_flag magic_quotes_gpc Off
                              php_flag track_vars On
                              php_flag register_globals Off
                              php_admin_flag allow_url_fopen Off
                              php_value include_path .
                              php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
                              php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/javascript/
                              </IfModule>
                              </Directory>

                              <Directory /usr/share/phpmyadmin/setup>
                              <IfModule mod_authn_file.c>
                              AuthType Basic
                              AuthName "phpMyAdmin Setup"
                              AuthUserFile /etc/phpmyadmin/htpasswd.setup
                              </IfModule>
                              Require valid-user
                              </Directory>

                              <Directory /usr/share/phpmyadmin/libraries>
                              Order Deny,Allow
                              Deny from All
                              </Directory>

                              <Directory /usr/share/phpmyadmin/setup/lib>
                              Order Deny,Allow
                              Deny from All
                              </Directory>








                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Mar 24 '16 at 0:20









                            techraf

                            2,75092035




                            2,75092035










                            answered Jun 3 '15 at 1:47









                            user3589508

                            211




                            211























                                -1














                                This worked for me in centos
                                removing unnecessary backup files of configuration



                                [root@Stats-Server-1 etc]# cd httpd/



                                [root@Stats-Server-1 httpd]# ls
                                conf conf.d conf.modules.d logs modules run



                                [root@Stats-Server-1 httpd]# sudo nano conf.d



                                [root@Stats-Server-1 httpd]# cd conf.d



                                [root@Stats-Server-1 conf.d]# ls



                                autoindex.conf phpMyAdminbk.conf phpMyAdmin.conf.rpmsave userdir.conf
                                php.conf phpMyAdmin.conf README welcome.conf



                                [root@Stats-Server-1 conf.d]# rm -rf phpMyAdminbk.conf



                                [root@Stats-Server-1 conf.d]# rm -rf phpMyAdmin.conf.rpmsave



                                [root@Stats-Server-1 conf.d]# sudo systemctl restart httpd.service






                                share|improve this answer





















                                • none of these commands have anything whatsoever to do with permissions that I can see.
                                  – Elder Geek
                                  Feb 5 '18 at 18:58
















                                -1














                                This worked for me in centos
                                removing unnecessary backup files of configuration



                                [root@Stats-Server-1 etc]# cd httpd/



                                [root@Stats-Server-1 httpd]# ls
                                conf conf.d conf.modules.d logs modules run



                                [root@Stats-Server-1 httpd]# sudo nano conf.d



                                [root@Stats-Server-1 httpd]# cd conf.d



                                [root@Stats-Server-1 conf.d]# ls



                                autoindex.conf phpMyAdminbk.conf phpMyAdmin.conf.rpmsave userdir.conf
                                php.conf phpMyAdmin.conf README welcome.conf



                                [root@Stats-Server-1 conf.d]# rm -rf phpMyAdminbk.conf



                                [root@Stats-Server-1 conf.d]# rm -rf phpMyAdmin.conf.rpmsave



                                [root@Stats-Server-1 conf.d]# sudo systemctl restart httpd.service






                                share|improve this answer





















                                • none of these commands have anything whatsoever to do with permissions that I can see.
                                  – Elder Geek
                                  Feb 5 '18 at 18:58














                                -1












                                -1








                                -1






                                This worked for me in centos
                                removing unnecessary backup files of configuration



                                [root@Stats-Server-1 etc]# cd httpd/



                                [root@Stats-Server-1 httpd]# ls
                                conf conf.d conf.modules.d logs modules run



                                [root@Stats-Server-1 httpd]# sudo nano conf.d



                                [root@Stats-Server-1 httpd]# cd conf.d



                                [root@Stats-Server-1 conf.d]# ls



                                autoindex.conf phpMyAdminbk.conf phpMyAdmin.conf.rpmsave userdir.conf
                                php.conf phpMyAdmin.conf README welcome.conf



                                [root@Stats-Server-1 conf.d]# rm -rf phpMyAdminbk.conf



                                [root@Stats-Server-1 conf.d]# rm -rf phpMyAdmin.conf.rpmsave



                                [root@Stats-Server-1 conf.d]# sudo systemctl restart httpd.service






                                share|improve this answer












                                This worked for me in centos
                                removing unnecessary backup files of configuration



                                [root@Stats-Server-1 etc]# cd httpd/



                                [root@Stats-Server-1 httpd]# ls
                                conf conf.d conf.modules.d logs modules run



                                [root@Stats-Server-1 httpd]# sudo nano conf.d



                                [root@Stats-Server-1 httpd]# cd conf.d



                                [root@Stats-Server-1 conf.d]# ls



                                autoindex.conf phpMyAdminbk.conf phpMyAdmin.conf.rpmsave userdir.conf
                                php.conf phpMyAdmin.conf README welcome.conf



                                [root@Stats-Server-1 conf.d]# rm -rf phpMyAdminbk.conf



                                [root@Stats-Server-1 conf.d]# rm -rf phpMyAdmin.conf.rpmsave



                                [root@Stats-Server-1 conf.d]# sudo systemctl restart httpd.service







                                share|improve this answer












                                share|improve this answer



                                share|improve this answer










                                answered Feb 5 '18 at 16:58









                                tharanga Rajapaksha

                                1




                                1












                                • none of these commands have anything whatsoever to do with permissions that I can see.
                                  – Elder Geek
                                  Feb 5 '18 at 18:58


















                                • none of these commands have anything whatsoever to do with permissions that I can see.
                                  – Elder Geek
                                  Feb 5 '18 at 18:58
















                                none of these commands have anything whatsoever to do with permissions that I can see.
                                – Elder Geek
                                Feb 5 '18 at 18:58




                                none of these commands have anything whatsoever to do with permissions that I can see.
                                – Elder Geek
                                Feb 5 '18 at 18:58


















                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Ask Ubuntu!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.





                                Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                Please pay close attention to the following guidance:


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f525976%2fforbidden-you-dont-have-permission-to-access-phpmyadmin-on-this-server%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                                Mangá

                                 ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕