Thanks for the moral support.
What server settings are involved that affect who a script runs as?
The only reference I've found is in some info from
www.modwest.com/php (they say they solve this problem for their hosting). I have not used them, but it looks like a dead ringer for the issue that I have.
Here is their blurb:
<code>
Context Consistency Explained
Web developers typically interact with their website files in three distinct ways, or contexts.
File upload/download (FTP or SCP)
Command line (telnet or SSH)
Web browser
The problem at many web hosts is that each of these contexts has its own set of rules. These rule mismatches at the very least create confusion, but can also complicate the development process or even degrade security.
For example, files created via FTP or SSH may be owned by the developer's user account (or UID), but files created by website PHP scripts are owned by a different UID, such as "apache", "nobody", or "www-data". As a result, either you cannot remove and edit files created by your scripts, or your script cannot create data files at all. The most common error is "Permission denied", requiring knowledge and execution of Unix commands such as chmod and chown on a case-by-case basis. ...
</code>
I am 100% certain I am not searching for this with the right words, and look forward to a *nix admin to say "Don - all you have to do is ..."
Thanks for the suggestions so far.