Fun with Unix
I'm sure this is all very simple stuff, but I don't know it...I have a website on a Unix host. My setup is, I believe, fairly generic. In my root directory is a subdirectory called "www" (which I know is really a mapping to "public_html"). In this subdirectory I have all my static web pages as well as further subdirectories "cgi-bin" (which contains my script) and "scriptdata" (which contains data files referenced by my script).
Question 1
When I refer to a file in "scriptdata" from within my script, can I do it without including my username in the path? It seems that, for example :
~/www/scriptdata/file
is acceptable from the shell, but not from within the script. Currently I have to address it as :
/home/username/www/scriptdata/file
which doesn't seem very elegant.
Question 2
Is it possible to make it so that "scriptdata" cannot be read with a browser, but still accessed by the script?
Question 3
I don't want search engines to see the contents of "scriptdata". I know about "robots.txt" but given my confusion about filepaths in Unix I'm not sure how to construct the "disallow" parts.
Is it :
Disallow: /scriptdata/
or
Disallow: scriptdata/
or something else even? And in which directory does the "robots.txt" file go? I'm guessing "www" but I'm not sure.
Thanks in advance for any advice.