Directory Permissions Question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bonehead

    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_passwo rd_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?

  • Andy Barfield

    #2
    Re: Directory Permissions Question

    bonehead wrote:
    [color=blue]
    > 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:[/color]

    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


    Hope this helps, regards,

    Andy

    Comment

    • 'bonehead

      #3
      Thanks Re: Directory Permissions Question

      Andy Barfield wrote:[color=blue]
      > 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[/color]

      Thanks. Setting AllowOverride to All worked.

      Comment

      Working...