Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

nph-build.cgi error

Quote Reply
nph-build.cgi error
[Wed Sep 6 01:00:14 2000] nph-build.cgi: unable to open what's new page:
/home/Mottster/www/New/index.html. Reason: Permission denied at
/home/Mottster/www/cgi-bin/admin/nph-build.cgi line 629.

This error only occurs when running the build from cron and not when I run it from the administrator menu. I've verifed the permissions that for both www (777) and New (777) there should not be any permission problems. I found this article:

http://www.gossamer-threads.com/perl/forum/showthreaded.pl?Cat=&Board=LSQLDisc&Number=71687

and

http://www.gossamer-threads.com/perl/forum/showthreaded.pl?Cat=&Board=LSQLDisc&Number=72039

But neither help in resolving my issue. Is it mandatory to use the pages directory for this to work? I wouldn't think so, since I changed all paths information in the links.pm file.

Thanks,

Sean Mott
http://www.weathertalk.net
Internet's best weather search engine
Quote Reply
Re: nph-build.cgi error In reply to
You need to first delete all folders and files within your www directory, then create your folders (New, Cool, Ratings) and change their permission to 777. Then re-build your directory via telnet. Then set your crontab. The problem is not associated with the permission of the folders/files, but with the OWNER of the folder and files. The OWNER needs to be your account name or administrator name, and NOT NOBODY (which is the default user that is associated with files and folders that are first created via HTTP - web browser).

BTW: You most likely will not be able to build via your web browser any longer after building via telnet.

Regards,

Eliot Lee

Quote Reply
Re: nph-build.cgi error In reply to
If you have "root" access

Once you do a build, change the permissions to chmod -R 777 dirname

That will allow the server to write new pages, overwrite existing ones, etc.

You'll need to do the same thing any time you change the method of build, and new pages or directories are written.

I much prefer my pages and especially directories to be owned by 'me' and chmod 777 than owned by the webserver and chmod 777. That gives _me_ ownership, and no hastles via telnet, and _allows_ the server to build pages via Http, rather than giving the server ownership and _allowing_ me to build pages via telnet, subtle, but part of the 'fun' of permissions.

If you _never_ build via telnet, it's not a bad idea to leave the directories and files owned by the webserver. It's a tad of extra security, at the price of not being able to edit the files as 'you'.

One of the problems on long-standing webservers, is that the permissions are never reevaluated over time, and eventually security holes start to appear. It's best to have a policy for the server, then if any directory needs some different policy, you can note that. For instance, the .../links/pages directories being chmod 777 or owned by nobody, etc.



http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/

Quote Reply
Re: nph-build.cgi error In reply to
Thanks for the help. I will attempt this when I get home from work.. No telnet access here.. :(


Thanks,

Sean Mott
http://www.weathertalk.net
Internet's best weather search engine
Quote Reply
Re: nph-build.cgi error In reply to
Gentleman,

Thanks for the help, as now everything is working just fine. You may want to put that in the FAQ section as I would suspect that others may be unaware of having the proper access for the cron event to work.



Thanks,

Sean Mott
http://www.weathertalk.net
Internet's best weather search engine
Quote Reply
Re: nph-build.cgi error In reply to
Hello all,

I am allmost there to set the crontab (have to figure it out how:)),
but if i use with chmod -R 777 dirname can i still build it webbased ?

Allready thanks.

Regards Startpoint.

Quote Reply
Re: nph-build.cgi error In reply to
Since some people are having questions regarding how I got my crontab event working.. Here's the reply...

---------------
Here's what I did to get my crontab build to work properly:

(1) Delete all folders that nph-build.cgi creates.
(2) Then telnet into your server
(3) Change to your path that has nph-build.cgi
(4) Type 'perl nph-build.cgi' and let it run it's process

Then you should be good to go.

Sean

PS-I think that my provider is running linux. Here's what my crontab even looks like.

In my build_links.sh file I have:

/path/to/cgi/links/admin/nph-build.cgi > /path/to/web/links/admin/logs/build_links.log

Then in my crontab file that I use for all my crontab events I have:

# (Re)Build the Links HTML Files each day at 12:00 a.m and 12:00 p.m.
MAILTO=webmaster@weathertalk.net
0 0,12 * * * /my/path/to/build_links.sh



Thanks,

Sean Mott
http://www.weathertalk.net
Internet's best weather search engine