uShop English (U.S.) for 179!

uStorekeeper English (U.S.) for 149!

 Products
       uTest
       uReserve
       uShop
       uStorekeeper
       uGolf
       uDirectory
       uSignIn
 Tech Support
       Support Policy
       Knowledge Base
            uTest
            uReserve
            uShop
            uStorekeeper
            uGolf
            uDirectory
            uSignIn
       Documentation
       Reference Sites
 Legal
       Software Piracy
       Legal Notices
       Privacy Policy
       Licensing
 Miscellaneous
       Reseller Info
       Contact Us
       Site Map
Order Reader Config Error

Knowledge Base Lobby : uShop Support Conference : CGI Script Related Problems
Nov-19-17 11:11 AM EST
Original Message
Order Reader Config Error
Author Chris Duffy on 04-10-2002 at 00:48 (EST)
Just moved a site using Ushop to new hosting service. Had to reconfigure everything. Finally all is working except the Order Reader gives a page that says only:
Configuration Error
Unable to open directory ./data/

Please help. Thanks!
E-MAIL AUTHOR | TABLE OF CONTENTS

Table Of Contents
  Order Reader Config Error Chris Duffy, 2002-04-10 00:57:50 (1)
            RE: Order Reader Config Error Bill Weiner, 2002-04-10 07:07:19 (2)
                 It is screwed up again.... Chris Duffy, 2003-02-23 23:06:24 (3)
                      What doesn't work now is the Order Reader. Chris Duffy, 2003-02-23 23:13:01 (4)
                           Here is what the Diagnostics say.... Chris Duffy, 2003-02-23 23:18:27 (5)
                           Help! Chris Duffy, 2003-02-23 23:24:26 (6)
                                RE: Help! Bill Weiner, 2003-02-24 06:51:45 (7)
                                     Is there anyway I can fix this on my end? Chris Duffy, 2003-02-24 19:11:46 (8)
                                          I now have cgiwrap.... Chris Duffy, 2003-02-24 23:12:39 (9)
                                               RE: I now have cgiwrap.... Bill Weiner, 2003-02-26 07:49:00 (10)

Messages In This Discussion
         1. Order Reader Config Error
        Author Chris Duffy on 04-10-2002 at 00:57 (EST)
I fixed it by chmod ing the data folder 777. But it can't stay this way can it? It is wide open then. But if I use 733 I can't read the orders and with 766 the rest of the forms don't work.

This was easier to set up from scratch than it has been to reconfigure.

Please help with the chmod thing.
Thanks!
Chris
TABLE OF CONTENTS
                 2. RE: Order Reader Config Error
                Author Bill Weiner on 04-10-2002 at 07:07 (EST)
The important thing is that regular website visitors cannot view the contents of your "data" directory by just going to the URL of your data directory. See item #4 on this security reference page:

http://www.uburst.com/uShop/security.html

If they can see the contents of your data directory, then you may have to use cgi-wrap be able to lower the permissions yet still allow the uShop CGI script to read/write to that directory. Let me know if you need any assistance utilizing cgi-wrap. (It's actually very easy... just a case of referring to your URLs slightly differently.)
TABLE OF CONTENTS
                         3. It is screwed up again....
                        Author Chris Duffy on 02-23-2003 at 23:06 (EST)
I made the duplicate store for the discount problem. But now I have messed up my cgi-bin. If I get the permissions so that the order reader works then the data folder can be read by everyone. !@#$%%^^ Help! If I chmod the cgi-bin 700 or 733 nothing works. So I chmod cgi-bin 755. But then everything is readable. I am on a Unix server. I am not sure it was ever safe. I never tried to get into the data folder before.

Please Help ASAP. I am in trouble.
TABLE OF CONTENTS
                                 4. What doesn't work now is the Order Reader.
                                Author Chris Duffy on 02-23-2003 at 23:13 (EST)
I can place orders and Login. But get "Unable to open directory ./data2/" & "Unable to open directory ./data/"

One folder for each store
TABLE OF CONTENTS
                                         5. Here is what the Diagnostics say....
                                        Author Chris Duffy on 02-23-2003 at 23:18 (EST)
DIAGNOSTIC TESTS
Data Directory = OK
Sendmail = Path OK
General Settings = OK
Affiliate Info = Does Not Exist
Affiliate Log File = Does Not Exist
Customer Log File = OK
Inventory Log File = OK
Coupon Data File = OK
TABLE OF CONTENTS
                                         6. Help!
                                        Author Chris Duffy on 02-23-2003 at 23:24 (EST)
What do you mean by "referring to your URLs a little differently"?
TABLE OF CONTENTS
                                                 7. RE: Help!
                                                Author Bill Weiner on 02-24-2003 at 06:51 (EST)
Again as described on this security page:

http://www.uburst.com/uShop/security.html

It is important that your "data" directory is not visible to regular website visitors.

So, ideally, the permissions on that "data" directory should be 700 or 733. If you find that you must you chmod 777 in order to get data to write to that directory, then you should make sure that just going to the URL of the directory does not permit regular website visitors from accessing the files in the directory.

In fact, you should get some sort of "Permission Denied" message such as when you try to access the "data" directory on our server:

http://www.uburst.com/cgi-bin/ushop/data/

What the permission on the "data" directory can be set as.... and still allow CGI scripts to access it... depends on who CGI scripts are run as. By default, CGI Scripts often run as "nobody" or perhaps "www".... so the permissions would have to be such that those users can access the bin.

You should consult your web hosting provider on how to setup your directory such that CGI scripts have permission to read/write to your cgi-bin/data directory.... while regular website visitors cannot access your cgi-bin/data directory. They should be able to help.

If anything, they will probably provide a way to use "cgi-wrap" on their server. CGI WRAP will allow the script to run as a user that has permission to read/write to a chmod 700 directory. CGI WRAP will be setup differently on every server, but as an example, our CGI Test script can be accessed via the URL:

http://www.uburst.com/cgi-bin/cgitest.pl

However, on our server, CGI WRAP is setup such that you prepend "http://qs133.pair.com/cgi-bin/cgiwrap/uburst" onto the URL. So the same script can be accessed via the URL:

http://qs133.pair.com/cgi-bin/cgiwrap/uburst/cgitest.pl

(The above is slightly different for https)

Running the script through our cgi-wrap URL allows the script run as the user "uburst" and thus all it to access directories that are only accessible to the uburst user.

Again, you should consult with your web hosting provider on how to setup your directory such that CGI scripts have permission to read/write to your cgi-bin/data directory.... while regular website visitors cannot access your cgi-bin/data directory.
TABLE OF CONTENTS
                                                         8. Is there anyway I can fix this on my end?
                                                        Author Chris Duffy on 02-24-2003 at 19:11 (EST)
My host's tech support are not responding intelligently, argh!
Is there anyway I can fix this on my end? Does cgi-wrap come with Perl? Or do I have to buy it? Or can you help me write it?

Thanks for all your help!
Chris
TABLE OF CONTENTS
                                                                 9. I now have cgiwrap....
                                                                Author Chris Duffy on 02-24-2003 at 23:12 (EST)
I now have cgiwrap. But it is working the same as the cgi-bin. I have installed the folder chris (my username with my host. And I have put the scripts inside it and the data folder.I have chmoded them as the original instructions recommended. But I keep getting "Unable to open ./data/ushop-settings.txt" or whatever when ushop.pl tries to write to the text files.

Any other suggetions? Your help is VERY MUCH appreciated!
Chris
TABLE OF CONTENTS
                                                                         10. RE: I now have cgiwrap....
                                                                        Author Bill Weiner on 02-26-2003 at 07:49 (EST)
A couple things to check/try:

1) If using CGI-WRAP now, make sure you use the CGI-WRAP url in both the "script_url" parameter of your uShopOrderButton applet and in all configuration questions at the top of the ushop.pl script.

2) Additionally, to make sure you are pointing to the correct "data" directory on your server, you may want to try using the full directory path instead of a relative directory path. That is, instead of using "./data/" for your $data_directory setting, try the full directory path... something like "/www/youraccount/cgi-bin/data/" ... depending on how your server is setup. This will ensure that you are using the desired data directory.
TABLE OF CONTENTS

© 2003 Microburst Technologies, Inc.