On Tue, Sep 20, 2005 at 01:06:16AM +0900, Dave Gutteridge enlightened us:
PHP and MySQL seem to working on my CentOS installation. I'd like to install phpMyAdmin as well, so I downloaded the necessary files from phpMyAdmin's homepage and copied them to /var/www/html...
... except that's where the process stopped. My regular user account doesn't have permission to write into the /var/www/html folder.
Should I just chmod the folder to 777? Is there a reason it's not already user accessible?
This is a local machine where I'll be testing web pages of my own design, and not accessible from the web.
Or at least I hope not. If I'm running an Apache server just for local files, it's not being seen on the web, is it?
You probably don't want world write permissions on your publicly accessible directory. Ever. If anyone finds a bug in apache/php/etc, it makes their life a whole lot easier.
Generally with phpMyAdmin, I do the following (as root):
1. Extract the tarball in /var/www, resulting in /var/www/phpMyAdmin-2.X.X
2. Create a phpmyadmin.conf file in /etc/httpd/conf.d directory that contains the line:
Alias /phpMyAdmin "/var/www/phpMyAdmin-2.X.X"
This lets me try out new versions without losing old versions, etc, just by changing the Alias in the conf file. Don't forget to reload apache after adding the file (/sbin/service httpd graceful)
As a general rule, anything that is happening "globally" on the system will have to be performed with superuser permissions (either by becoming root via "su -", or by using the sudo command). In this specific case, if you wanted to do it only using your user privelidges, you would have to install phpMyAdmin into your home directory ($HOME/public_html).
Matt