LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > Password Protected Directories Issue

Reply
 
Thread Tools Display Modes
  #1  
Old 11-05-2009, 10:43 AM
MikeDVB MikeDVB is offline
Senior Member
 
Join Date: Jul 2009
Posts: 110
Default Password Protected Directories Issue

On a new server I just copied over an account that has a few password protected directories and they've quit working.

I deleted the .htaccess and .htpasswd files and recreated them and it's still not letting anybody log in.

I created a brand new account and created a password protected directory and I'm still getting the same issue.

http://www.webhostingboard.net/test/ username is test and password is test - you can verify this.

Any suggestions?
Reply With Quote
  #2  
Old 11-05-2009, 11:52 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 5,889
Can you double check that the user that Apache run as can access the password file?

sudo -u nobody cat <path_to_.htpasswd>
Reply With Quote
  #3  
Old 11-05-2009, 12:20 PM
MikeDVB MikeDVB is offline
Senior Member
 
Join Date: Jul 2009
Posts: 110
Excellent - it seems the script we run to fix home directory permissions set it to user.user for .htpasswds when it needed to be user.nobody - modified the script and re-running it now to resolve all of these issues.

Thank you so much.
Reply With Quote
  #4  
Old 11-05-2009, 12:55 PM
MikeDVB MikeDVB is offline
Senior Member
 
Join Date: Jul 2009
Posts: 110
Just in case anybody needs this in the future on a cPanel server:
Code:
#!/bin/bash
for user in `/bin/ls /var/cpanel/users`; do
        echo "Fixing permissions for account: ${user}"
        chown -R ${user}.${user} /home/${user}
        chown ${user}.nobody /home/${user}/public_html
        chown -R ${user}.mail /home/${user}/etc
        chown ${user}.nobody /home/${user}/.htpasswds/
done
Add this in fixhomepermissions.sh and then set it to chmod 755 and run "sh fixhomepermissions.sh"
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:42 PM.



- Archive - Top
© Copyright 2003-2007 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.