Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Links 1.11 not properly building pages with cron

Quote Reply
Links 1.11 not properly building pages with cron
Hi:

I've noticed that my Links does not cron rebuild all pages that should be (i.e., those with new listings). However, when I do it manually from the admin page, it does.

I discovered this when a submitter notified me that their listing was not showing even it had been approved 2 day earlier. When I built pages myself from admin, it displayed.

Ideas? Can this involve ownerships? Although I cannot see how as all data files and directories are created by Links.

Dan Smile
Quote Reply
Re: Links 1.11 not properly building pages with cron In reply to
It would help if we could see the cron table entry for the event.
Quote Reply
Re: Links 1.11 not properly building pages with cron In reply to
It's not a cron problem but here is the entry:

00 03 * * * /home/serve/mysite/scripts/addlink/admin/nph-build.cgi

It's set to update once daily at midnight.

The main home page and the New and Cool pages are updated properly. The first category index.html page is updated but not all subsequent pages (including the more.html pages within the first category).

However, it works fine when I manually build using the admin.cgi script via the browser. The cron job seems to fail after the first category html page. BTW, this has been going on since the beginning.

Dan Smile
Quote Reply
Re: Links 1.11 not properly building pages with cron In reply to
If your server is not using something like cgiwrap to change the userid to your userid when they run, they the scripts run as "nobody" when executed from the web. If you built the pages from the web first, then the files that were created are owned by that "nobody" userid.

When cron executes the script, the script runs under your userid and will not rebuild pages it doesn't own because it doesn't have permissions to do it.

The way around it, at this point is to delete all the web directories except the root links web directory and then rebuild from your shell account, allowing the pages to be built under your userid. However, you will not be able to build from the web again if that is done (you'll get permissions denied errors) but will be able to rebuild anytime from your shell account (which usually works faster anyway).

I hope this helps.