troubleshooting Question

Having problems with CGI scripts for my website

Avatar of Leee211
Leee211Flag for United States of America asked on
PerlApache Web ServerScripting LanguagesLunarpages
7 Comments1 Solution1692 ViewsLast Modified:
I have a website setup through LunarPages and use Verotel as my user/password manager.
I was having some problems (that's a whole other story) and I did some changes in the files.

I've finally gotten to the point where I am able to add users and have the user and password show up in the .passwd file in my data directory.  But when I go to login, none of the 100+ usernames in the data file work.
Also when I check on the Verotel website (Control Panel) it's not showing the users that were recently added.
(On my server they are showing up in the passwd file only)

So the names are being added to the file, but Verotel is not getting the info and is not allowing any access to the members section.  And I've checked that the password file is set correctly in the Verotel control panel:  and that the directory for the member's section is correct.

I've been over and over all the setup instructions and I can't see what I'm missing.  Is anyone familiar with the "" type files?

Below is a snippet of code from the file.  Do I need to change the $ cp and $ chmod  and $ mkdir lines, because these files and directories and permissions already exist?  I only customized the following lines (I put in "xxxxxxx" for this forum post for security reasons):
our $prefix

1. Copy the file C<> to C<cgi-bin> directory of your website, give it a
name of your choice and set permissions on the file:
  $ cp /path/to/cgi-bin/
  $ chmod 755 /path/to/cgi-bin/
2. The password file (C<.htpasswd>) will be stored in so-called data directory
on your website. Either use already existing directory or create a new one and
set permissions on this directory.
  $ mkdir /full/path/to/your_data_dir
  $ chmod 770 /full/path/to/your_data_dir
3. Copy all files from C<data> directory in the distribution file to your newly
created data directory.
  $ cp data/* data/.* /full/path/to/your_data_dir
4. Edit the script and change value of C<$prefix> variable to the name of your
data directory (including full path).
5. [Optional] You can modify other variables in the configuration area to better
suit your needs.
6. Modify C<.htaccess> file in protected area of your website. This file
specifies location of your password file. It should contain line like
  AuthUserFile /home/xxxxxxx/data/.htpasswd
7. Visit Verotel Control Center and test your RUM setup by trying to add user
account. Check that the added test user account allows you to access protected
area of your website. Try to delete this user account and check access to the
protected area isn't possible for this user anymore.
8. If your RUM setup works fine, please submit a test request so a Verotel
Engineer can test your installation. If your RUM setup doesn't work, please
submit an installation request, and a Verotel Engineer will perform the
installation for you at no cost.
Keep the configuration files in directories invisible to users browsing your
website. The actual physical location of the files doesn't matter as long as
ordinary users don't have access to them.
=head2 $prefix
This is the data directory which contains the password file, log file and other
supporting files.
Replace default value in C<$prefix> with full path to data directory on your
website. To prevent ordinary users from accessing the directory and files
inside, you should set proper file permissions on them.
  $ chmod 770 /full/path/to/your_data_dir
our $prefix            = '/home/xxxxxx/data';
=head2 $ip_file
To make sure only Verotel servers can call this script, caller's IP address is
checked against list of trusted IP addresses and only connections from IP
address found on this list are allowed. This list is stored in
IP addresses are stored one per line, in IP/mask (C<A.B.C.D/dd>) format.  Mask
is a number between 1 and 32 (inclusive) and defines network mask length in
bits. Bit mask length of 32 defines single IP address, shorter masks define IP
address ranges (subnets).
Current Verotel IP range is C<>.
Don't forget to set proper file permissions to prevent ordinary users from
reading or writing the file:
  $ chmod 660 /home/xxxxxx/data/.ht_IP_addresses
our $ip_file           = "$prefix/.ht_IP_addresses";
=head2 @file_config
Specify locations of C<htpasswd> files, along with their respective log files.
C<@file_config> consists of <password file - log file> pairs. Most people
will only need one such pair, but should you need the accounts to be mirrored
across several websites, you can list as many pairs as you want.
Set permissions on your C<.htpasswd> and log files.
  $ chmod 660 /full/path/to/your_data_dir/.htpasswd
  $ chmod 660 /full/path/to/your_data_dir/verotel_RUM.log
our @file_config = (    # passwd file          log file
                    "$prefix/.htpasswd", "$prefix/verotel_RUM.log",
                    #   "passwd file 2", "log file 2",
                    #   "passwd file 3", "log file 3",
                    # and so on
                    # or if you want to chain-call another RUM script
                    #  running on another server
                    #   "http://your.server/cgi/", "",
                    # note 'http://' at the beginning and '?' at the
                    # end of the URL are mandatory. Log file name is empty.
our $suffix = '.tmp';
=head2 $access_lock_file
This file is used as a lock to prevent concurrent changes to C<$storage_file>.
Don't forget to set the same permissions as above.
  $ chmod 660 /home/xxxxxxx2/data/.htlock
our $access_lock_file  = "$prefix/.htlock";
# End of configuration
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 7 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros