By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,278 Members | 1,359 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,278 IT Pros & Developers. It's quick & easy.

Directory Permissions Question

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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.