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

Problem Building Pages

Quote Reply
Problem Building Pages
Hello,

Installed links very recently and this is the first time using it.

I've added a category and a link in that cat. Next I've tried to build pages but I get the following...

Links Manager: Building Pages
Building Pages
Pages built on 2-May-2001 at 14:08:11
--------------------------------------------------------

Backing up database . . .
Backing up links, category and email database (File::Copy) ...

CGI ERROR
==========================================
Error Message : Unable to copy links backup. Reason: Permission denied
Script Location : /home/c/cateye/public_html/cgi-bin/links/admin/nph-build.cgi
Perl Version : 5.00503

-----------------------------------------------

My permissions are as follows...
links CHMOD 755
admin CHMOD 755
nph-build.cgi CHMOD 755

Have I set these wrong?
Also, once links has built the pages, does it tell you or give links, i.e. how do you check that they've been built.
Sorry for the really basic question, but I'm new to all this.

thank you
sara





Quote Reply
Re: Problem Building Pages In reply to
Your links.db only needs to be readable. So change the permissions of it to: 666

Glenn

Links 2 Mods Site:
http://cgi-resource.co.uk/pages/links2mods.shtml
Quote Reply
Re: Problem Building Pages In reply to
Actually, it needs to be readable and WRITABLE...thus the 666 perm.

Regards,

Eliot Lee
Quote Reply
Re: Problem Building Pages In reply to
Yep sorry left the writable part out!

Glenn

Links 2 Mods Site:
http://cgi-resource.co.uk/pages/links2mods.shtml
Quote Reply
Re: Problem Building Pages In reply to
My links.db is set to 666. I just tried again and I get the same error....


Building Pages
Pages built on 3-May-2001 at 13:34:18
--------------------------------------------------------

Backing up database . . .
Backing up links, category and email database (File::Copy) ...

CGI ERROR
==========================================
Error Message : Unable to copy links backup. Reason: Permission denied
Script Location : /home/c/cateye/public_html/cgi-bin/links/admin/nph-build.cgi
Perl Version : 5.00503

--------------------------------------------------

Any ideas, I'm really getting nowhere with this.

thanks
Sara





Quote Reply
Re: Problem Building Pages In reply to
I just thought I should also mention that I've set all permissions like they are set in this post...

http://www.gossamer-threads.com/perl/resources/jump.cgi?ID=1065

Sara



Quote Reply
Re: Problem Building Pages In reply to
Re-check the permissions of your data and backup directories.

Glenn

Links 2 Mods Site:
http://cgi-resource.co.uk/pages/links2mods.shtml
Quote Reply
Re: Problem Building Pages In reply to
Both data and backup directories are set at 755, isn't that what they should be?





Quote Reply
Re: Problem Building Pages In reply to
NOPE!

The data and backup, as well as the hits and ratings folder (in the data folder) ALL need to be set to either 777 or 766....

In Reply To:

chmod 777 (drwxrwxrwx) on the hits directory.
chmod 777 (drwxrwxrwx) on the ratings directory.
chmod 777 (drwxrwxrwx) on the directory where Links pages will be created.


Regards,

Eliot Lee
Quote Reply
Re: Problem Building Pages In reply to
Yeah, sorry I've run out of ideas! This is the sub that's nph-build is getting stuck on:


sub build_backup {
# --------------------------------------------------------
# Backs up important database files.
#
my $date = &get_date;
if (-e "$db_script_path/backup/$date.links.db") {
print "\tBackup exists for today.. Skipping\n";
return;
}

# Try to do it the right way..
eval { require File::Copy; };
if (!$@) {
print "\tBacking up links, category and email database (File::Copy) ... \n";
&File::Copy::copy ("$db_script_path/data/links.db", "$db_script_path/backup/$date.links.db") or &cgierr ("Unable to copy links backup. Reason: $!");
&File::Copy::copy ("$db_script_path/data/categories.db", "$db_script_path/backup/$date.category.db") or &cgierr ("Unable to copy category backup. Reason: $!");
&File::Copy::copy ("$db_script_path/data/email.db", "$db_script_path/backup/$date.email.db") or &cgierr ("Unable to copy email backup. Reason: $!");
}
# Otherwise, the ugly way.
else {
print "\tBacking up links, category and email database (Regular - $@) ... \n";
foreach (qw!links categories email!) {
open (TMP, "$db_script_path/data/$_.db") or &cgierr ("Unable to open $db_script_path/data/$_.db. Reason: $!");
open (TMPOUT, ">$db_script_path/backup/$date.$_.db") or &cgierr ("Unable to open $db_script_path/$date.$_.db. Reason: $!");
while (<TMP>) {
print TMPOUT;
}
close TMP;
close TMPOUT;
}
}
}


The bolded lines being the exact place where it's having problems.


Glenn

Links 2 Mods Site:
http://cgi-resource.co.uk/pages/links2mods.shtml
Quote Reply
Re: Problem Building Pages In reply to
Glennu,

The problem is with the user's folder permissions...the DATA and BACKUP folders need to be set to 777 or 766 NOT 755 as stated in an earlier reply.

Regards,

Eliot Lee
Quote Reply
Re: Problem Building Pages In reply to
That's what I thought, it was just the person in that post seemed so sure of himself!



Glenn

Links 2 Mods Site:
http://cgi-resource.co.uk/pages/links2mods.shtml
Quote Reply
Re: Problem Building Pages In reply to
Thanks a lot guys, it's working now!!

Sara