You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Mike Sandells <M....@liverpool.ac.uk> on 2008/04/10 15:14:45 UTC

[users@httpd] Fetching pages from a user's home filestore on windows

We're currently running apache on Netware, including the ability for
users to make pages available via a public.www directory on their
netware home filestore. Over the summer, we're replacing Netware with
a windows back end, and therefore apache on netware (and the mod_edir
that provides netware home directory support) will be going away.

I'm therefore trying to set up apache on windows, to do the same job.
This is just for simple page serving, nothing fancy, but needs to
include the home filestore mechanism, such that;

http://myserver/~username

fetches pages from;

[username's home filestore]\public.www

where 'username' is an account in active directory, with a home
directory attribute that specifies where their filestore is.

So far, I've not been able to get this to work. Experiments with
apache on a test workstation (XP SP2, joined to the domain) look up
home directories for users in the workstation's local SAM, but not in
AD (it looks for ~username inside the document root).

Experiments on a member server (Win2003 R2) seems to always look for
~username inside the document root, and doesn't appear to invoke any
look up of the AD home directory attribute.

In both cases, apache is running as a console app, as a user with
permissions to see the files concerned. I've checked the UNCs in the
same session that apache is running in, and it can access the files.

In httpd.conf, I've uncommented the userdir module;

LoadModule userdir_module modules/mod_userdir.so

and uncommented the include of the userdir conf;

Include conf/extra/httpd-userdir.conf

In the userdir conf, I've set;

UserDir "public.www"

and made the corresponding change to the Directory access below it.
Other than that, and the server name etc, configuration is default.

Cranking the loglevel up to debug doesn't reveal any extra information
related to home directory support.

Can anyone suggest what I'm doing wrong, or is this something that
isn't possible in the first place?

The number of users involved is large, so creating a symbolic link or
similar for each user is not a realistic solution. Also, the path to
the home filestore is not the same for all users, so an approach with
wildcards (\\server\users\*\public.www) isn't an option either. It
really needs to pull the UNC for that user out of AD, and append the
userdir to that.

Any help gratefully received...

Mike
-- 
Mike Sandells
The University of Liverpool - Computing Services Department
Work: mikejs@liv.ac.uk  http://www.liv.ac.uk/csd  0151 794 4437/7789
Home: mike@mikejs.com   http://www.mikejs.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Fetching pages from a user's home filestore on windows

Posted by Mike Sandells <M....@liverpool.ac.uk>.
On 16/04/2008 15:35, William A. Rowe, Jr. wrote:

> See what mod_userdir on win32 has to say about it... my only 
> question is whether or not apr is returning the 'local' home path 
> or the remote one in your case.  Of course you must first change 
> the "run as" user for the service to a user account with read 
> access to these files and the ability to browse the directories 
> from root (//foo/bar/) up to the path of their home.

I've had chance to spend some more time on this, but I'm still not
getting anywhere.

Apache is running as a user who has permissions to the filestore in
question. I can map drives etc as that user and see the files. I'm
also using a remote document root, specified as a UNC path to the same
area of filestore, and this works without problems.

The problem is that it does not appear to be looking up the home
directory attribute at all. If I specify;

UserDir "public.www"

in the httpd-userdir.conf, then accessing http://myserver/~user
results in a file not found error for [DOCUMENTROOT]/~user. At no
point does the home directory attribute of 'user' appear in the error
log, even with logging set to debug. It is as if the "~" were being
ignored.

I've tested this with both local users on the machine where apache is
being run, and domain users. (The machine is a member of the domain,
and the user running apache is a domain user.)

However, if I change userdir so that it does not involve a home
directory lookup;

UserDir "//server/share/users/*/public.www"

then it works (so permissions are OK).

BUT, this will not work in production as there is no single path that
covers all the users (there will be at least 12 different values for
'share').


I've also looked at the home directory attributes in the domain. The
GUI appears to offer two different settings for user home directories;

- Local path: [string]
or
- Connect [drive letter] to [string]

In practice, there are only two attributes under the covers -
"homeDirectory" and "homeDrive". "homeDirectory" corresponds to the
[string] in BOTH of the settings above. Whether it appears in one box
or the other depends on whether "homeDrive" is set or unset (tested
via changing things around and looking at the resulting attributes via
LDAP). I've tried this both ways, but it makes no difference.
mod_userdir on win32 does not appear to be looking at the
homeDirectory attribute in the first place.

Anyone any other suggestions? Any other places I could ask? Any other
way of achieving the same end result?

Mike
-- 
Mike Sandells
The University of Liverpool - Computing Services Department
Work: mikejs@liv.ac.uk  http://www.liv.ac.uk/csd  0151 794 4437/7789
Home: mike@mikejs.com   http://www.mikejs.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Fetching pages from a user's home filestore on windows

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Mike Sandells wrote:
> 
> I asked this a couple of days ago, but have not seen any replies to
> it. If this is not the correct forum to ask such questions, could
> someone direct me to a more appropriate one?
> 
> Essentially, we have a need to serve pages from user home filestore,
> where;
> 
> - The home filestore is on a Windows filesystem, visible via CIFS.
> 
> - The location of a given user's home filestore is stored in their
>  Active Directory object as a UNC path.

See what mod_userdir on win32 has to say about it... my only question
is whether or not apr is returning the 'local' home path or the remote
one in your case.  Of course you must first change the "run as" user
for the service to a user account with read access to these files
and the ability to browse the directories from root (//foo/bar/) up
to the path of their home.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Fetching pages from a user's home filestore on windows

Posted by Mike Sandells <M....@liverpool.ac.uk>.
I asked this a couple of days ago, but have not seen any replies to
it. If this is not the correct forum to ask such questions, could
someone direct me to a more appropriate one?

Essentially, we have a need to serve pages from user home filestore,
where;

- The home filestore is on a Windows filesystem, visible via CIFS.

- The location of a given user's home filestore is stored in their
  Active Directory object as a UNC path.

- There is no single path that could access any user's filestore
  simply by substituting a wildcard with the username.

  i.e. //server/share/*/public_html is not a viable approach, because
  server and share will not be the same for all users. We don't think
  we can resolve this with DFS.

- The number of users involved is large (1000's).

We had assumed that to get this to work, apache itself would have to
be running on windows, but this is incidental. If apache on some other
platform can do the above, we're interested.

We're currently doing the equivalent with netware filestore, and
apache on netware, and are keen to retain this ability as we move to a
windows backend and windows filestore.

Any advice gratefully received...

Mike
-- 
Mike Sandells
The University of Liverpool - Computing Services Department
Work: mikejs@liv.ac.uk  http://www.liv.ac.uk/csd  0151 794 4437/7789
Home: mike@mikejs.com   http://www.mikejs.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org