Suppose I have a home directory "~someuser/www" which Apache (maintained by someone else than me) exposes as http://www.myserver.com/~someuser . If I want to limit this directory to certain users, I can create a .htaccess file in the www folder containing the line "Require user username1 username2" etc.
The question is: Is there a way to specify in .htaccess that only the owner of the home directory, whoever that might be, is supposed to be able to access it from the web?
If I knew that the owner was "someuser", then I would just specify "Require user someuser", but in this case I'm trying to put together a template that will work for a lot of users, and I'd like to avoid having to tell them each to insert their own username if possible.
(More background: Specifically I'm trying to get it to work on the MIT site described here: http://scripts.mit.edu/faq/15 . We'll have students doing little web projects in their own www folders, but don't want other students to be able to view their JavaScript source code.)