Hi there,
First of all I know very little about cgi programming other than
setting globals/variables and occasionally changing bits of code
whenever a script prints text of html. Applying modifications
created by 3rd parties is no problem either.
Procedures:
• I've just installed Links 2.0 and followed the readme instructions
• Tested the admin functions, everything okay except nph-build.cgi
• Had some problem with nph-build.cgi so I browsed through the G.T.
UNIX-install board:
• I changed the name to build.cgi, no effect, changed it back to
nph-build.cgi
• I also removed instances of $nph in nph-build.cgi, still no effect,
left changes as is
• The error was something in the line of "permission denied" so I
again changed all directories in admin dir to 777 (to be sure)
• added an empty links.db.bak file to the data dir (also 777)
Result: no more permission denied and nph-build.cgi seems to work,
at least it showed no error
• I again created a new category (in fact a new directory?) and added
a link to that category, so far so good. Again build showed no error
Problems:
• After build (nph-build.cgi) I found that the html file created by the
script had a permission of 600 instead of 644.
• Other cgi scripts I use that ONLY create/modify .dat files DO work
when a directory is set to 777. Those file are read by the cgi
script that uses the "print" function to display it in the browser.
Those .dat files are never requested by the browser directly.
So it does not create static html pages. (Robboard for instance.)
• I asked tech support about this and they said the script has to CHMOD
the directories to 777 and html files to 644 in order for it to work.
Q: I suspect Links already does this by default or am I wrong?
Now for the ugly part:
• The owner/group is set to www/www which means I don't have access
to those files/directories. I can't change the CHMOD because I get
"operation not permitted" errors in my ftp program. It's the same
with a telnet connection.
• I know my ISP's web server usually DOES NOT allow scripts to create
public available directories and files although they said they
changed that policy recently.
• The web server software also expects an index.cache file in EVERY
directory, with a complete list of all files to be served. Now I can
UPDATE the index.cache files in telnet with one cmd, so that's not
the problem, although very irritating because I'd have to perform
this operation after every build. It's just that I can't access those
directories in the first place to CREATE the index.cache files.
Q: What to do about this?
Don't tell me I need to switch ISP's! I do know an index.cache file
can be created by a cgi script, because it's only a list of files
with their corresponding mime type. (text/css, text/html etc.)
If there's no solution to this problem someone may have to add this
procedure (create/update index.cache files) to Links for me which
from what I understand (limited as it is!) should not be all that
difficult.
I've included some specs taken from the perl environment variables
printed when the last error occurred, might shed some light on things:
Perl Version : 5.00503
AUTOBOOT : YES
BOOT_IMAGE : linux-2.2.15
CONSOLE : /dev/console
GATEWAY_INTERFACE : CGI/1.1
HOME : /
HOSTTYPE : i386
HTTP_ACCEPT : */*
HTTP_ACCEPT_LANGUAGE: nl
HTTP_COOKIE : DCForumStyle=
HTTP_HOST : www.angels4angels.net
HTTP_REFERER : http://www.angels4angels.net/links/admin/¬
admin.cgi?display=navigation
HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC)
INIT_VERSION : sysvinit-2.77
OSTYPE : Linux
PATH : /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
PREVLEVEL : N
REQUEST_METHOD : GET
RUNLEVEL : 3
SERVER_NAME : www.angels4angels.net
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.1
SERVER_SOFTWARE : WN/2.2.4
SHELL : /bin/bash
SHLVL : 3
TERM : linux
URL_SCHEME : http
Any help/assistance greatly appreciated. Or maybe someone already
went through the whole process? Feel free to respond! :)
First of all I know very little about cgi programming other than
setting globals/variables and occasionally changing bits of code
whenever a script prints text of html. Applying modifications
created by 3rd parties is no problem either.
Procedures:
• I've just installed Links 2.0 and followed the readme instructions
• Tested the admin functions, everything okay except nph-build.cgi
• Had some problem with nph-build.cgi so I browsed through the G.T.
UNIX-install board:
• I changed the name to build.cgi, no effect, changed it back to
nph-build.cgi
• I also removed instances of $nph in nph-build.cgi, still no effect,
left changes as is
• The error was something in the line of "permission denied" so I
again changed all directories in admin dir to 777 (to be sure)
• added an empty links.db.bak file to the data dir (also 777)
Result: no more permission denied and nph-build.cgi seems to work,
at least it showed no error
• I again created a new category (in fact a new directory?) and added
a link to that category, so far so good. Again build showed no error
Problems:
• After build (nph-build.cgi) I found that the html file created by the
script had a permission of 600 instead of 644.
• Other cgi scripts I use that ONLY create/modify .dat files DO work
when a directory is set to 777. Those file are read by the cgi
script that uses the "print" function to display it in the browser.
Those .dat files are never requested by the browser directly.
So it does not create static html pages. (Robboard for instance.)
• I asked tech support about this and they said the script has to CHMOD
the directories to 777 and html files to 644 in order for it to work.
Q: I suspect Links already does this by default or am I wrong?
Now for the ugly part:
• The owner/group is set to www/www which means I don't have access
to those files/directories. I can't change the CHMOD because I get
"operation not permitted" errors in my ftp program. It's the same
with a telnet connection.
• I know my ISP's web server usually DOES NOT allow scripts to create
public available directories and files although they said they
changed that policy recently.
• The web server software also expects an index.cache file in EVERY
directory, with a complete list of all files to be served. Now I can
UPDATE the index.cache files in telnet with one cmd, so that's not
the problem, although very irritating because I'd have to perform
this operation after every build. It's just that I can't access those
directories in the first place to CREATE the index.cache files.
Q: What to do about this?
Don't tell me I need to switch ISP's! I do know an index.cache file
can be created by a cgi script, because it's only a list of files
with their corresponding mime type. (text/css, text/html etc.)
If there's no solution to this problem someone may have to add this
procedure (create/update index.cache files) to Links for me which
from what I understand (limited as it is!) should not be all that
difficult.
I've included some specs taken from the perl environment variables
printed when the last error occurred, might shed some light on things:
Perl Version : 5.00503
AUTOBOOT : YES
BOOT_IMAGE : linux-2.2.15
CONSOLE : /dev/console
GATEWAY_INTERFACE : CGI/1.1
HOME : /
HOSTTYPE : i386
HTTP_ACCEPT : */*
HTTP_ACCEPT_LANGUAGE: nl
HTTP_COOKIE : DCForumStyle=
HTTP_HOST : www.angels4angels.net
HTTP_REFERER : http://www.angels4angels.net/links/admin/¬
admin.cgi?display=navigation
HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC)
INIT_VERSION : sysvinit-2.77
OSTYPE : Linux
PATH : /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
PREVLEVEL : N
REQUEST_METHOD : GET
RUNLEVEL : 3
SERVER_NAME : www.angels4angels.net
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.1
SERVER_SOFTWARE : WN/2.2.4
SHELL : /bin/bash
SHLVL : 3
TERM : linux
URL_SCHEME : http
Any help/assistance greatly appreciated. Or maybe someone already
went through the whole process? Feel free to respond! :)