You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by André Warnier <aw...@ice-sa.com> on 2008/11/02 12:54:52 UTC
Re: [users@httpd] Cannot change User for httpd.exe with Apache2.2
for Windows
Li Xin wrote:
> Hi Eric,
>
> I basically followed the second link. I don't know that the Apache for Windows won't be able to set the User for httpd.exe. So it means, that the "User" directive in httpd.conf is useless for Windows?
>
Hi.
I believe you are right, and the "User" and "Group" directives do
nothing under Windows.
The very first thing to tell us maybe, is *how* you started Apache under
Windows.
If it is started as a Windows Service, then the user under which it runs
is the user under which the Windows Service runs. You can check (and
change) that as follows :
- right-click on the "My Computer" icon
- choose Manage.. Services and Applications .. Services .. Apache...
- right-click on the Apache line
- select the second tab "login as" or "run as"
By default, it is set as "LocalSystem", but you can change this to any
valid Windows user-id, within some limits. (*)
"LocalSystem" is a special user under Windows : it has almost all rights
on the local machine, but is a not a Domain user and has no rights to
access any network resource (e.g. shared server directories, network
printers etc).
If you start Apache within a command window, it runs as the user under
which you logged in.
Another couple of notes :
"Administrators" (with "s") is not a Windows user, it is a User Group,
in which there can be several users.
Also, if you get a page or a file from Apache (through the browser), and
save it to disk, the owner of that file is not the user under which
Apache is running. It is the user under which *you* are running the
browser that saves this file.
(*)
- For example, in order to be able to have Apache listen on any port =<
1024, the user may need to be a least member of the local Administrators
group.
- if you change the user, make sure you pick one whose password does not
"age", otherwise when the password runs out, you won't be able to
restart the Apache service.
- be aware that "Administrator" (user) and "Administrators" (group) are
names that change depending on the international version of Windows you
are using. On a Spanish Windows e.g., these are "Administrador" and
"Administradores" respectively. I don't even want to guess what they
might be in a Chinese Windows ;-). But LocalSystem never changes, and
that is probably why the Apache installer always uses that one by default.
---------------------------------------------------------------------
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] Cannot change User for httpd.exe with Apache2.2 for Windows
Posted by Li Xin <ni...@yahoo.com>.
Thanks, André! Your explanation is really helpful. Changing the 'login as' to a specific user gives what i want. Basically, I want to let only that specific user can edit pages through the web server.
Thanks,
-- Xin
--- On Sun, 11/2/08, André Warnier <aw...@ice-sa.com> wrote:
> From: André Warnier <aw...@ice-sa.com>
> Subject: Re: [users@httpd] Cannot change User for httpd.exe with Apache2.2 for Windows
> To: users@httpd.apache.org
> Date: Sunday, November 2, 2008, 3:54 AM
> Li Xin wrote:
> > Hi Eric,
> >
> > I basically followed the second link. I don't know
> that the Apache for Windows won't be able to set the
> User for httpd.exe. So it means, that the "User"
> directive in httpd.conf is useless for Windows?
> >
> Hi.
> I believe you are right, and the "User" and
> "Group" directives do nothing under Windows.
>
> The very first thing to tell us maybe, is *how* you started
> Apache under Windows.
>
> If it is started as a Windows Service, then the user under
> which it runs is the user under which the Windows Service
> runs. You can check (and change) that as follows :
> - right-click on the "My Computer" icon
> - choose Manage.. Services and Applications .. Services ..
> Apache...
> - right-click on the Apache line
> - select the second tab "login as" or "run
> as"
> By default, it is set as "LocalSystem", but you
> can change this to any valid Windows user-id, within some
> limits. (*)
> "LocalSystem" is a special user under Windows :
> it has almost all rights on the local machine, but is a not
> a Domain user and has no rights to access any network
> resource (e.g. shared server directories, network printers
> etc).
>
> If you start Apache within a command window, it runs as the
> user under which you logged in.
>
> Another couple of notes :
> "Administrators" (with "s") is not a
> Windows user, it is a User Group, in which there can be
> several users.
>
> Also, if you get a page or a file from Apache (through the
> browser), and save it to disk, the owner of that file is not
> the user under which Apache is running. It is the user
> under which *you* are running the browser that saves this
> file.
>
> (*)
> - For example, in order to be able to have Apache listen on
> any port =< 1024, the user may need to be a least member
> of the local Administrators group.
> - if you change the user, make sure you pick one whose
> password does not "age", otherwise when the
> password runs out, you won't be able to restart the
> Apache service.
> - be aware that "Administrator" (user) and
> "Administrators" (group) are names that change
> depending on the international version of Windows you are
> using. On a Spanish Windows e.g., these are
> "Administrador" and "Administradores"
> respectively. I don't even want to guess what they might
> be in a Chinese Windows ;-). But LocalSystem never changes,
> and that is probably why the Apache installer always uses
> that one by default.
>
> ---------------------------------------------------------------------
> 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
---------------------------------------------------------------------
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