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

links.db losing permissions(?)

Quote Reply
links.db losing permissions(?)
I set the links.db to 777 as directed - but when I choose to "build all" - it seems as if the permissions get changed.

That (?) causes jump.cgi to throw an Internal Server Error (500)

I've searched the forums and troubleshooted quite a bit.

Any insight on this folks?

T
Quote Reply
Re: [digitalmedusa] links.db losing permissions(?) In reply to
1) The links.db file along with your other database files in the data folder should be set to 666.

2) Codes for fixing this permission problem have been provided before.

Search for links.db 644 666 in ALL the Links 2.0 Forums.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Heckler] links.db losing permissions(?) In reply to
Oops - correct.

I changed it to 777 because I was getting "permissions denied" errors when I changed it to 644

Changed all permissions properly and I'm getting an Internal Server Error when I go to a link via jump.cgi

The permissions for jump.cgi are 755

Any new insight on this error? Searching the forums - is there one post that stands out as "the" solution?
(seems as if lots of folks had this problem)

Thanks Heckler.

T





Quote Reply
Re: [digitalmedusa] links.db losing permissions(?) In reply to
1) Please read my post again...Like I already stated, ALL the DATABASE and TXT files (.db and .txt) in your data folder need to be 666, NOT 777. The data folder is what should be 777.

2) To maintain the 666 perms of your links.db, READ my reply in the following thread:

http://gossamer-threads.com/..._flat&post=82627

Took me like 30 seconds to find the relevant thread...try reading the threads in the search result page...I know that some of the titles are meaningless, but with a little bit of "reading" through the Threads, you will find relevant answers.

Goodbye!
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [digitalmedusa] links.db losing permissions(?) In reply to
seems as if changing everything back to proper permissions brings me around to my initial problem again.

When I click "build all" the permission for the links.db changes to 644

Someone suggested a bit of scripting that would change it back - although this novice couldn't figure out how to implement that.

T


Quote Reply
Re: [digitalmedusa] links.db losing permissions(?) In reply to
sorry - bad typing and user headache from wrestling with this caused me to type "644" instead of 666 earlier Eliot.

I've followed your link but see two seperate suggestions - both of which I'll try.
One suggestion via that link is *another* thread. Another suggestion is adding

else { chmod 0666, $db_links_name; }


Hopefully one of those will work for me.

Thanks,

t
Quote Reply
Re: [digitalmedusa] links.db losing permissions(?) In reply to
Tried to add that link with no success.

The bit of code in those two subsections of nph-build.cgi flow like this:



if (-s "$db_links_name.bak" > 0) {

if (! rename ("$db_links_name.bak", $db_links_name)) {

print "\tCouldn't rename! Had to copy. Strange: $!\n";

open (DBTMP, ">$db_links_name") or &cgierr ("unable to open links database: $db_links_name. Reason: $!");

open (DB, "$db_links_name.bak") or &cgierr ("unable to open temp links database: $db_links_name.bak. Reason: $!");

while (<DB>) { print DBTMP; }

close DB;

close DBTMP;

}

}

else {

&cgierr ("Error building! Links database is 0 bytes!");
}



*Where* exactly would I include the other "else"?
Is there anything I need to delete as well?

T
Quote Reply
Re: [digitalmedusa] links.db losing permissions(?) In reply to
UGH!

Did you even read the reply I posted on May 21, 2000, 1:43 PM???

I give the EXACT location where the codes need to be added!
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Heckler] links.db losing permissions(?) In reply to
yes, of course.

I added it like this

while ( ) { print DBTMP; }
close DB;
close DBTMP;
}
else { chmod 0666, $db_links_name; }

Seems to work fine for keeping the mod 666 - but I still get an Internal Server error when trying to click on a link built.

Thanks for your patience.

T
Quote Reply
Re: [digitalmedusa] links.db losing permissions(?) In reply to
1) Check the permission of ALL your DB and TXT files in your data folder (for the third time, they should ALL be 666 INCLUDING the url.db, which is used with the jump.cgi script).

2) Check the syntax of your jump.cgi script...

Code:

perl -c jump.cgi


How long have you been using Links 2.0? Like for more than a year! Wink
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [Heckler] links.db losing permissions(?) In reply to
PirateYeah - more than a year. Sucessfully installed it on a Windoze server (it's still not fully functional but hey...), now I'm trying it on UNIX to see if I have better luck.

All permissions are correct now.

About the jump.cgi - if you're talking about putting in the full path, I've done that.

Yeah, a year - I keep coming back to this script because I'm confident I can get it to run smoothly. *And* because you're so helpful :)

I'll keep searching the boards and trying stuff until something happens or I give up - whichever comes first.

Thanks Eliot.

T


Quote Reply
Re: [digitalmedusa] links.db losing permissions(?) In reply to
Have you checked your error log for the exact error?


Quote Reply
Re: [RedRum] links.db losing permissions(?) In reply to
Just did.

Premature end of script headers: /home/cust2/usr2025/cgi-bin/alienlink/jump.cgi

Maybe this thread will help me:
http://www.gossamer-threads.com/...forum.cgi?post=83411

I'll give it a shot after I get back from Mexican food and a few Coronas. I *promise* I won't post intoxicated.

T
Quote Reply
Re: [digitalmedusa] links.db losing permissions(?) In reply to
turns out my FTP program was putting Windows CR/LF in the cgi scripts as a line break character.
Re-installed the files and things are working cheery now.

Thanks for the help.