• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1237
  • Last Modified:

PhpMyAdmin - I dont have permissions to access the phpmyadmin folder?

Well tittle says it all, ive got phpmyadmin on my linux box and im getting that you do not have permission to access /phpmyadmin/ on this server.

So guys what am I doing wrong? seems like a permissions problem, I looked in the configure and the user is apache and in the apache group, so thats ok.

Im not what else it could be, anyone got any ideas?

0
thechase22
Asked:
thechase22
  • 10
  • 9
1 Solution
 
xDamoxCommented:
Hi,

Have you change the directory permission to 755 e.g.

chmod 755 phpmyadmin
0
 
thechase22Author Commented:
Yea I tried that, is there any place in linux where you can view all chmod's on folders etc? just off topic question.

one thing I was thinkin of was, does it have anything to do with the .htaccess file, or the http basic authentication, I havent changed anything in that area, but its been something that ive kept in mind.

what you think?
0
 
pjedmondCommented:
the .htaccess file will alter what you can and can't access.

Try temporarily mv the .htaccess file, and see if you can you access as you require?

Otherwise, check that the file permissions not only of the directory, but also the files in it allow reading.

If you give the *EXACT* error message, and the output appended to the /var/log/httpd/errors.log (or equivalent for your system), then we can prbably tell you exactly what the problem is:)

HTH:)

0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
xDamoxCommented:
Hi

To view the status of the directory and see all the permissions you can do:

stat directory

What Linux distrobution are you using? also do you have SELinux enabled? to check if selinux is enabled type:

sestatus

and paste the output
0
 
xDamoxCommented:
Also about the .htaccess does it point to a .htpasswd file and have you added yourself to the .htpasswd file?
0
 
thechase22Author Commented:
[Mon Jun 05 09:11:19 2006] [notice] core dump file size limit raised to 0 bytes
[Mon Jun 05 09:11:20 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Jun 05 09:11:20 2006] [notice] core dump file size limit raised to 0 bytes
[Mon Jun 05 09:11:20 2006] [notice] Digest: generating secret for digest authentication ...
[Mon Jun 05 09:11:20 2006] [notice] Digest: done
[Mon Jun 05 09:11:20 2006] [notice] LDAP: Built with OpenLDAP LDAP SDK
[Mon Jun 05 09:11:20 2006] [notice] LDAP: SSL support unavailable
[Mon Jun 05 09:11:21 2006] [notice] mod_python: Creating 4 session mutexes based on 150 max processes and 0 max threads.
[Mon Jun 05 09:11:21 2006] [notice] Apache/2.0.53 (Fedora) configured -- resuming normal operations
[Mon Jun 05 09:12:34 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin/ denied
[Mon Jun 05 09:12:34 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 09:12:37 2006] [error] [client 127.0.0.1] Directory index forbidden by rule: /var/www/html/
[Mon Jun 05 09:12:38 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 09:14:00 2006] [error] [client 172.16.10.132] File does not exist: /var/www/html/intranet/linksmanager
[Mon Jun 05 09:14:37 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 09:14:39 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 09:20:12 2006] [error] [client 172.16.10.132] File does not exist: /var/www/html/intranet/vtiger
[Mon Jun 05 09:20:12 2006] [error] [client 172.16.10.132] File does not exist: /var/www/html/intranet/favicon.ico, referer: http://web.hankyu.co.uk/vtiger/index.php?action=index&module=Home
[Mon Jun 05 09:28:11 2006] [error] [client 172.16.10.132] File does not exist: /var/www/html/intranet/phpmyadmin
[Mon Jun 05 09:30:09 2006] [error] [client 127.0.0.1] Directory index forbidden by rule: /var/www/html/
[Mon Jun 05 09:30:09 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 09:30:13 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 09:30:13 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 09:42:59 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin/ denied
[Mon Jun 05 09:42:59 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 09:44:45 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin/ denied
[Mon Jun 05 09:44:45 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 09:44:47 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin/ denied
[Mon Jun 05 09:44:47 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 09:44:47 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin/ denied
[Mon Jun 05 09:44:47 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 09:44:47 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin/ denied
[Mon Jun 05 09:44:47 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 09:44:47 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin/ denied
[Mon Jun 05 09:44:47 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 09:44:47 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin/ denied
[Mon Jun 05 09:44:47 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 09:44:48 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin/ denied
[Mon Jun 05 09:44:48 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 09:44:48 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin/ denied
[Mon Jun 05 09:44:48 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 09:55:33 2006] [error] [client 127.0.0.1] Directory index forbidden by rule: /var/www/html/
[Mon Jun 05 09:55:33 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 09:55:51 2006] [error] [client 127.0.0.1] Directory index forbidden by rule: /var/www/html/
[Mon Jun 05 09:55:51 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 09:55:52 2006] [error] [client 127.0.0.1] Directory index forbidden by rule: /var/www/html/
[Mon Jun 05 09:55:52 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:01:49 2006] [error] [client 127.0.0.1] Directory index forbidden by rule: /var/www/html/
[Mon Jun 05 10:01:50 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:01:53 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:01:53 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:02:33 2006] [notice] caught SIGTERM, shutting down
[Mon Jun 05 10:02:34 2006] [notice] core dump file size limit raised to 0 bytes
[Mon Jun 05 10:02:35 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Jun 05 10:02:36 2006] [notice] core dump file size limit raised to 0 bytes
[Mon Jun 05 10:02:36 2006] [notice] Digest: generating secret for digest authentication ...
[Mon Jun 05 10:02:36 2006] [notice] Digest: done
[Mon Jun 05 10:02:36 2006] [notice] LDAP: Built with OpenLDAP LDAP SDK
[Mon Jun 05 10:02:36 2006] [notice] LDAP: SSL support unavailable
[Mon Jun 05 10:02:37 2006] [notice] mod_python: Creating 4 session mutexes based on 150 max processes and 0 max threads.
[Mon Jun 05 10:02:37 2006] [notice] Apache/2.0.53 (Fedora) configured -- resuming normal operations
[Mon Jun 05 10:02:39 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:02:40 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:02:40 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:02:40 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:02:41 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:02:41 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:02:42 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:02:42 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:02:42 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:02:42 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:02:54 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:02:54 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:02:55 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:02:55 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:02:55 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:02:55 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:02:55 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:02:55 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:02:55 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:02:55 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:02:59 2006] [notice] caught SIGTERM, shutting down
[Mon Jun 05 10:03:01 2006] [notice] core dump file size limit raised to 0 bytes
[Mon Jun 05 10:03:02 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Jun 05 10:03:02 2006] [notice] core dump file size limit raised to 0 bytes
[Mon Jun 05 10:03:02 2006] [notice] Digest: generating secret for digest authentication ...
[Mon Jun 05 10:03:02 2006] [notice] Digest: done
[Mon Jun 05 10:03:02 2006] [notice] LDAP: Built with OpenLDAP LDAP SDK
[Mon Jun 05 10:03:02 2006] [notice] LDAP: SSL support unavailable
[Mon Jun 05 10:03:03 2006] [notice] mod_python: Creating 4 session mutexes based on 150 max processes and 0 max threads.
[Mon Jun 05 10:03:03 2006] [notice] Apache/2.0.53 (Fedora) configured -- resuming normal operations
[Mon Jun 05 10:03:04 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:03:05 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:03:05 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:03:05 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:03:05 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:03:05 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:03:05 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:03:05 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:03:06 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:03:06 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:03:09 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin/ denied
[Mon Jun 05 10:03:09 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:03:12 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:03:12 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:03:26 2006] [notice] caught SIGTERM, shutting down
[Mon Jun 05 10:03:27 2006] [notice] core dump file size limit raised to 0 bytes
[Mon Jun 05 10:03:28 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Jun 05 10:03:28 2006] [notice] core dump file size limit raised to 0 bytes
[Mon Jun 05 10:03:28 2006] [notice] Digest: generating secret for digest authentication ...
[Mon Jun 05 10:03:28 2006] [notice] Digest: done
[Mon Jun 05 10:03:28 2006] [notice] LDAP: Built with OpenLDAP LDAP SDK
[Mon Jun 05 10:03:28 2006] [notice] LDAP: SSL support unavailable
[Mon Jun 05 10:03:29 2006] [notice] mod_python: Creating 4 session mutexes based on 150 max processes and 0 max threads.
[Mon Jun 05 10:03:29 2006] [notice] Apache/2.0.53 (Fedora) configured -- resuming normal operations
[Mon Jun 05 10:03:30 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:03:30 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:03:31 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:03:31 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:03:31 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:03:31 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:03:31 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:03:31 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:03:32 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:03:32 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:03:49 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:03:49 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:03:50 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:03:50 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:03:50 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:03:50 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:03:50 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:03:50 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:03:53 2006] [notice] caught SIGTERM, shutting down
[Mon Jun 05 10:03:54 2006] [notice] core dump file size limit raised to 0 bytes
[Mon Jun 05 10:03:55 2006] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Jun 05 10:03:55 2006] [notice] core dump file size limit raised to 0 bytes
[Mon Jun 05 10:03:55 2006] [notice] Digest: generating secret for digest authentication ...
[Mon Jun 05 10:03:55 2006] [notice] Digest: done
[Mon Jun 05 10:03:55 2006] [notice] LDAP: Built with OpenLDAP LDAP SDK
[Mon Jun 05 10:03:55 2006] [notice] LDAP: SSL support unavailable
[Mon Jun 05 10:03:56 2006] [notice] mod_python: Creating 4 session mutexes based on 150 max processes and 0 max threads.
[Mon Jun 05 10:03:56 2006] [notice] Apache/2.0.53 (Fedora) configured -- resuming normal operations
[Mon Jun 05 10:03:59 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:03:59 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:04:01 2006] [error] [client 127.0.0.1] Directory index forbidden by rule: /var/www/html/
[Mon Jun 05 10:04:01 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:04:05 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/phpmyadmni
[Mon Jun 05 10:04:05 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:04:08 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:04:08 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico
[Mon Jun 05 10:59:19 2006] [error] [client 127.0.0.1] (13)Permission denied: access to /phpmyadmin denied
[Mon Jun 05 10:59:19 2006] [error] [client 127.0.0.1] File does not exist: /var/www/html/favicon.ico

thats my log file, ill check out the other things what you said right now
0
 
thechase22Author Commented:
btw ive searched my whole linux box, and the only .htaccess file I have, is in the /phpmyadmin/libraries folder, I guess this folder is for the default configs that you can use, and just to as a reference maybe?
0
 
xDamoxCommented:
Hi,

And SELinux....?
0
 
thechase22Author Commented:
the what what?
0
 
xDamoxCommented:
Hi,

You seemed to of ignored my last psot:

What Linux distrobution are you using? also do you have SELinux enabled? to check if selinux is enabled type:

sestatus

and paste the output.
0
 
thechase22Author Commented:
ok well i didnt ignore your last post, I just didnt know what you meant, and I just did that command and it says SElinux enabled to your question :)
0
 
xDamoxCommented:
Hi,

:) good ok, could you do this outside the phpmyadmin directory:

ls -lZ

Notice the capitale Z you will get something similar to:

drwxr-xr-x  damian    damian     root:object_r:user_home_t        phpmyadmin

Could you paste the line you get
0
 
thechase22Author Commented:
drwxr-xr-x apache apache root:object_r:user_home_t phpmyadmin.

Thanks for the lesson anyways, thats a cool command i shall put in my noob book of Linux commands :P

So what do you make of this then?
0
 
xDamoxCommented:
Hi,

ok the problem is SELinux is protecting the user_home_t from being viewed by apache so do this:

chcon -t httpd_sys_content_t phpmyadmin -R

This will allow apache now to look at the directory, also see root change that too to:

chcon -u system_u phpmyadmin -R

And now apache should be able to view the phpmyadmin :)
0
 
thechase22Author Commented:
could we do this manually without the commands, how am I suppose to learn :P
0
 
xDamoxCommented:
What?

Thats the only way to do it: chcon changes the lable of the directory, type:

man chcon

this will give you details on it. The -R means recursive and will go throug all the sub directorys changes the labels.

Did you run what I told you to?
0
 
thechase22Author Commented:
yea that worked fine, I can now view that page, I still dont know what we did, What is chcon command?

Im trying to learn linux you see, got the basics, did we just alter security access to the folders or something? Like advanced permissions?
0
 
xDamoxCommented:
Hi,

chcon is used to change security context for SELinux. SELinux provides MAC (Mandantory Access Control) which,
tighens security.

As you may have noticed SELinux only gives apache access to the bare minimum for operating the reason for this is ebcause
if apache get hacked the hacker will have no priveledges other than to possible restart and stop apache.

I would recommend you have a read of: http://fedora.redhat.com/docs/selinux-faq-fc5/
0
 
xDamoxCommented:
> Im trying to learn linux you see, got the basics, did we just alter security access to the folders or something? Like advanced >permissions?

Yea you did change the advanced level of security permissions.
0
 
thechase22Author Commented:
Well thanks for you help again amigo :)
0

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

  • 10
  • 9
Tackle projects and never again get stuck behind a technical roadblock.
Join Now