470,620 Members | 1,735 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,620 developers. It's quick & easy.

Directory Permissions Question

Many thanks to all who replied to my previous post regaring proper
installation of phpMyAdmin on unix/apache.

Okay, I thought I had correctly followed all the steps to
password-secure the directory where I installed phpMyAdmin on my RedHat9
machine running apache, but I must be missing something:

1. Create a directory in /var/www/html to place the files.
2. Load the files.
3. Check the index.php and make sure it pretty much all works correctly.
4. Create a .htaccess file in the directory
5. Create a mypasswordfile in the directory
6. Edit the .htaccess file thus:

AuthName "My Domain"
AuthType Basic
AuthUserFile /var/www/html/mydirectory/mypasswordfile
require user myusername

7. Set the password thus:

htpasswd -c mypasswordfile myusername
password: my_typed_password_here

8. Set the permissions on .htaccess and mypasswordfile to 644.

After verifying that the files had the correct content, were located in
the correct directory, and had the correct permissions, I tried hitting
the index.php file from my M$ browser and still did *not* get a
username/password prompt. Also tried restarting the server, no avail. I
can still hit the index.php just by entering the url. However, on
exploring the directory with midnight commander, I do notice that there
is a file called '.htaccess' and *another* file called '.htaccess~' both
of which have the same content. I don't know if this is even relevant,
I'm not really much of a unix monkey but I guess I ought to be more of
one if I'm going to continue developing php/mysql.

Is it possible that the permissions on the directory holding the files
is the issue? Anyone have any troubleshooting suggestions?

Jul 17 '05 #1
2 1751
bonehead wrote:
Many thanks to all who replied to my previous post regaring proper
installation of phpMyAdmin on unix/apache.

Okay, I thought I had correctly followed all the steps to
password-secure the directory where I installed phpMyAdmin on my RedHat9
machine running apache, but I must be missing something:


Have you adjusted the httpd.conf file?

Load it up into a text editor (I can't remeber it's location in RH9
off-hand - try /etc/httpd/conf) and find
AllowOverride

This parameter controls if the .htaccess file is used or not. Just make
sure that it is the directive that relates to the appropriate web
document root.

More at
http://httpd.apache.org/docs/mod/cor...#allowoverride

Hope this helps, regards,

Andy

Jul 17 '05 #2
Andy Barfield wrote:
Have you adjusted the httpd.conf file?

Load it up into a text editor (I can't remeber it's location in RH9
off-hand - try /etc/httpd/conf) and find
AllowOverride


Thanks. Setting AllowOverride to All worked.

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Tracy Tripp | last post: by
2 posts views Thread by John | last post: by
1 post views Thread by Shahir A. Ahang | last post: by
reply views Thread by Jeff Reed | last post: by
3 posts views Thread by James Coleman | last post: by
3 posts views Thread by rick baker | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.