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

Unable to copy links backup

Quote Reply
Unable to copy links backup
 I have installed the script and everything in the admin is popping up fine. I am now in the testing stages. I added a category, then a link but when I went to build all this error came up:

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 : /iiw/cgi-bin/mistresss.com/links/admin/nph-build.cgi
Perl Version : 5.00405


The nph-build.cgi permission is set at -rwxr-xr-x

(help Smile
Quote Reply
Re: Unable to copy links backup In reply to
chmod 777 backup

--mark
Quote Reply
Re: Unable to copy links backup In reply to
  Thanks. That fixed it. Now the probelm is I am running into other permission errors. Is there a list anywhere of permissions to set for ALL of the files?
Here is the error I am getting now:
unable to open temp links database: /iiw/cgi-bin/mistresss.com/links/admin/data/links.db.bak. Reason: Permission denied
Script Location : /iiw/cgi-bin/mistresss.com/links/admin/nph-build.cgi

I have a feeling that this won't be the only one, that is why I asked about a complete list. It would be VERY helpful. Also, I went to look for links.db.bak and it doesn't exsist in the data directory.
Frown




[This message has been edited by MS (edited January 15, 2000).]
Quote Reply
Re: Unable to copy links backup In reply to
Complete list is in the README file. Read it.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------




Quote Reply
Re: Unable to copy links backup In reply to
Read it already. Smile
These are the only permissions listed
Set permissions:
chmod 755 (-rwxr-xr-x) on all .cgi files.
chmod 666 (-rw-rw-rw-) on all files in the data directory.
chmod 666 (-rw-rw-rw-) on all your template files (if using the online editor).
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.

So, since the error is coming up as:
(see above for complete error) [links/admin/data/links.db.bak. Reason: Permission denied]
and all of the files in the data dir are set at chmod 666 (-rw-rw-rw-)and there is no links.db.bak file in the data dir, what are your thoughts/suggestions?

Thanks for the help. Smile


Quote Reply
Re: Unable to copy links backup In reply to
Howdy,

Now Mark told me that what I did to fix the problem with backup, was not needed, but it fixed the problem on my ISP server. I cannot 777 any directory in my cgi-bin, this of course is a common, security feature. I could not find a path for backup in the .cfg file. So I tore into the nph-build.cgi, I searched for the backup routine, and found that it pointed to the ("$db_script_path. Which of course is the script path, so all I did was re-write the paths to backup, in nph-build.cgi i.e.
#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 ("/yourpath/data/links.db", "/yourpath/backup/$date.links.db") or &cgierr ("Unable to copy links backup. Reason: $!");
&File::Copy::copy ("/yourpath/data/categories.db", "/yourpath/backup/$date.category.db") or &cgierr ("Unable to copy category backup. Reason: $!");
&File::Copy::copy ("/yourpath/data/email.db", "/yourpath/backup/$date.email.db") or &cgierr ("Unable to copy email backup. Reason: $!");
}
Now, again I was told that this was not needed so do it at your own risk, but it worked for me, I am still testing, mainly for security issues, but the script runs well. Make sure you save in ascii, and ftp same.

Good Luck, nice script Smile




------------------
Cordially,
mkw@webchair.com
Quote Reply
Re: Unable to copy links backup In reply to
Right...And if you are using the same directory structure as the LINKS recommends, then you should be able to figure out the APPROPRIATE permissions of the files!

Best of luck,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------




Quote Reply
Re: Unable to copy links backup In reply to
Thanks to all of you for your help. Smile
I went in and followed the trail to were the problem was:links/admin/data/links.db.bak
I then set links.db to -rw-r-r and everything is now working fine, in regard to this error. Now, on to the next bug. Smile