Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

Create DB's? db & txt permission problems

Quote Reply
Create DB's? db & txt permission problems
Hello all,

I have downloaded the current version of Links2.0 as of March 21 2004. I have installed the software on a Linux Server (gentoo) with Apache 2.0 running on it. I have included a partial dump of both the links.cfg and apache2.conf files below. I have not added security yet to the admin folder.

I can run the Admin.cgi script, however if I try to create a category as per the readme.txt file, it get the following error: (after adding "use CGI::Carp qw(fatalsToBrowser);" to the admin.cgi script as suggested in the forums).

Error Message: error in get_defaults. unable to open id file: /usr/links/cgi-bin/admin/data/categoryid.txt
Reason: Permision denid
Script Location : /usr/links/cgi-bin/admin/admin.cgi
Perl Version: 5.008

The location it is looking for the file is correct. Now the instructions indicate to change the permisions of all the files in the data directory to chmod 666, however there are no files in this directory. I have done "chmod -R 666 data" from the admin directory, I have also tried creating empty files (touch categoryid.txt, chmod 666 categoryid.txt), but that also has not worked. Is the program supposed to create the data files, or is there another download I need that has the data files?

Thanks

madmagi

<<snip partial view of links.cfg>>
# PATH and URL of Admin CGI directory. No Trailing Slash.
$db_script_path = "/usr/links/cgi-bin/admin";
$db_dir_url = "http://genserver.inet/links/admin";

# URL of User CGI directory. No Trailing Slash.
$db_cgi_url = "http://genserver.inet/links/cgi-bin";

# PATH and URL of Pages to be built. No Trailing Slash.
$build_root_path = "/usr/links/pages";
$build_root_url = "http://genserver.inet/links/pages";

# PATH and URL of What's New page. No Trailing slash.
$build_new_path = "$build_root_path/New";
$build_new_url = "$build_root_url/New";

# PATH and URL of What's Cool page. No Trailing slash.
$build_cool_path = "$build_root_path/Cool";
$build_cool_url = "$build_root_url/Cool";

# PATH and URL of What's Rating page. No Trailing slash.
$build_ratings_path = "$build_root_path/Ratings";
$build_ratings_url = "$build_root_url/Ratings";

<< snip partial view of apache2.conf >>

Alias /links/admin/ /usr/links/cgi-bin/admin/
<Directory "/usr/links/cgi-bin/admin/">
Options ExecCGI
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>

Alias /links/cgi-bin/ /usr/links/cgi-bin/
<Directory "/usr/links/cgi-bin/">
Options ExecCGI
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>

Alias /links/ /usr/links/pages/
<Directory "/usr/links/pages/">
Options none
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
Quote Reply
Re: [madmagi] Create DB's? db & txt permission problems In reply to
There should be 8 files and two sub-directories in the data directory. Recheck your unzipped download files...


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Create DB's? db & txt permission problems In reply to
Thanks, must have been a late night - I missed the sub-folders - that did the trick.

Now am I having a new problem. I can CRUD categories and links just fine, but when I click on 'Build All', 'Staggered' or 'Staggered (Auto)' - nothing happens - as if the link does not exist. - All other links in the admin tool appear to work just fine.

madmagi
Quote Reply
Re: [madmagi] Create DB's? db & txt permission problems In reply to
Your config file is off a bit; add the red:

# PATH and URL of Admin CGI directory. No Trailing Slash.
$db_script_path = "/usr/links/cgi-bin/admin";
$db_dir_url = "http://genserver.inet/cgi-bin/links/admin";

# URL of User CGI directory. No Trailing Slash.
$db_cgi_url = "http://genserver.inet/links/cgi-bin"; ---should probably be http://genserver.inet/cgi-bin/links;


Also the paths need to be the full path on your server, which should include your domain name or some sort of username (assuming this is a shared server). Lastly, is .inet a correct TLD?


Leonard
aka PerlFlunkie
Quote Reply
Re: [PerlFlunkie] Create DB's? db & txt permission problems In reply to
Thanks for the reply, couple of questions. If my cgi-bin directories were not correct wouldn't the other admin links not work? Right now they all work except the 3 build options. As you can see from my post of the apache configuration, i believe I had the cgi-bin links correct (unless Links is hard-coded to that specific pathing). I simply created apache aliases to refer to the proper directory.

I have tested the 'url' paths on the server by creating a small test html file and calling it with the browser.

The server is a machine I have setup and administer on my own. My internal lan configuration uses .inet as it's internal TLD and works with no problem with any of the other software I have configured on any of the other servers. My router also understands and routes approprately for all .inet machines.

madmagi

<< SNIP >>
$db_script_path = "/usr/links/cgi-bin/admin";
$db_dir_url = "http://genserver.inet/cgi-bin/links/admin";


$db_cgi_url = "http://genserver.inet/links/cgi-bin"; ---should probably be http://genserver.inet/cgi-bin/links;


Also the paths need to be the full path on your server, which should include your domain name or some sort of username (assuming this is a shared server). Lastly, is .inet a correct TLD?
<< SNIP >>

Quote Reply
Re: [madmagi] Create DB's? db & txt permission problems In reply to
Okay, that's beyond my experience...Blush
Well then, I'm not sure what to tell ya. At the bottom of admin.cgi is this--give it a try.

# &cgierr("Done"); # Uncomment this line for Debugging... Will tack on form variables and environment variables
# to the end of every page. Quite Useful.
}


Leonard
aka PerlFlunkie