Locked Apache configuration file

Locked Apache configuration file

am 20.03.2010 13:16:31 von Marc Buyens

I am migrating to a new PC that runs Windows 7 and try reinstalling the
Apache/PHP environment that I use to develop and test my website. Apache
2.2.15 no SSL. PHP 5.2.12. This same combination was used on my old XP
machine. Installation did not give any special problems. Apache has not
been configured as a service, but to start as a task when I ask.
However, when I now want to edit the configuratution file, the file is
locked. It is not read procted as such, but some process seems to use
it. I stopped more or less everyting on the machine, checked all
processes that are still running, but did not find any potential
culprit. Apart from the OS, all other installed stuff is pretty much the
same. Any suggestion?

MarcB

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: Locked Apache configuration file

am 20.03.2010 13:26:07 von Eric Covener

On Sat, Mar 20, 2010 at 8:16 AM, Marc Buyens wrote:
> I am migrating to a new PC that runs Windows 7 and try reinstalling the
> Apache/PHP environment that I use to develop and test my website. Apache
> 2.2.15 no SSL. PHP 5.2.12. This same combination was used on my old XP
> machine. Installation did not give any special problems. Apache has not been
> configured as a service, but to start as a task when I ask. However, when I
> now want to edit the configuratution file, the file is locked. It is not
> read procted as such, but some process seems to use it. I stopped more or
> less everyting on the machine, checked all processes that are still running,
> but did not find any potential culprit. Apart from the OS, all other
> installed stuff is pretty much the same. Any suggestion?

http://technet.microsoft.com/en-us/sysinternals/bb896655.asp x


--
Eric Covener
covener@gmail.com

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: Locked Apache configuration file

am 20.03.2010 14:23:01 von Marc Buyens

Thanks for the suggestion. Unfortunately, it does not solve the mystery.
I installed the tool and used the search option to find references to
the file, but without result. I am not an expert in these things, but I
tried finding references to the file or its folder, etc. in various
ways, but it does not return any results.
Another thing that I observed is that I can rename the file, but if I do
so, the file is immediately recreated.

On 20/03/2010 13:26, Eric Covener wrote:
> On Sat, Mar 20, 2010 at 8:16 AM, Marc Buyens wrote:
>
>> I am migrating to a new PC that runs Windows 7 and try reinstalling the
>> Apache/PHP environment that I use to develop and test my website. Apache
>> 2.2.15 no SSL. PHP 5.2.12. This same combination was used on my old XP
>> machine. Installation did not give any special problems. Apache has not been
>> configured as a service, but to start as a task when I ask. However, when I
>> now want to edit the configuratution file, the file is locked. It is not
>> read procted as such, but some process seems to use it. I stopped more or
>> less everyting on the machine, checked all processes that are still running,
>> but did not find any potential culprit. Apart from the OS, all other
>> installed stuff is pretty much the same. Any suggestion?
>>
> http://technet.microsoft.com/en-us/sysinternals/bb896655.asp x
>
>
>

--
Marc Buyens
Analyst, Management Consultant& Managing Director

Xpragma bvba
Mechelsesteenweg 254
B-2820 Bonheiden
Belgium

tel. +32-(0)15-340 845
marc.buyens@xpragma.com
http://www.xpragma.com/


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: Locked Apache configuration file

am 20.03.2010 15:48:45 von Eric Covener

On Sat, Mar 20, 2010 at 9:23 AM, Marc Buyens wrote:
> Thanks for the suggestion. Unfortunately, it does not solve the mystery. I
> installed the tool and used the search option to find references to the
> file, but without result. I am not an expert in these things, but I tried
> finding references to the file or its folder, etc. in various ways, but it
> does not return any results.
> Another thing that I observed is that I can rename the file, but if I do so,
> the file is immediately recreated.

What made you think it was "locked" in the first place? There's a
Vista/Win7 FAQ that lets users edit administrator-owned files by
silently redirecting them as soon as you make changes, but Apache sees
the original.

--
Eric Covener
covener@gmail.com

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: Locked Apache configuration file

am 20.03.2010 17:12:19 von Marc Buyens

Well, first of all, you can see it. I use EditPad to edit text files
etc. and the icon shows a little lock bottom left. When I open the file
in the editor, it warns me about the file being read-only or in use. Of
course, it might be a problem of the editor, so I opened the file in
Notepad. This works, does not give a warning, but when I ask to save the
file, it sends me in a save as dialogue. When I specify the same
filename and after confirming that I want to replace the file, the save
fails.

On 20/03/2010 15:48, Eric Covener wrote:
> On Sat, Mar 20, 2010 at 9:23 AM, Marc Buyens wrote:
>
>> Thanks for the suggestion. Unfortunately, it does not solve the mystery. I
>> installed the tool and used the search option to find references to the
>> file, but without result. I am not an expert in these things, but I tried
>> finding references to the file or its folder, etc. in various ways, but it
>> does not return any results.
>> Another thing that I observed is that I can rename the file, but if I do so,
>> the file is immediately recreated.
>>
> What made you think it was "locked" in the first place? There's a
> Vista/Win7 FAQ that lets users edit administrator-owned files by
> silently redirecting them as soon as you make changes, but Apache sees
> the original.
>
>

--
Marc Buyens
Analyst, Management Consultant& Managing Director

Xpragma bvba
Mechelsesteenweg 254
B-2820 Bonheiden
Belgium

tel. +32-(0)15-340 845
marc.buyens@xpragma.com
http://www.xpragma.com/


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: Locked Apache configuration file

am 20.03.2010 17:22:55 von wrowe

On 3/20/2010 9:48 AM, Eric Covener wrote:
> On Sat, Mar 20, 2010 at 9:23 AM, Marc Buyens wrote:
>> Thanks for the suggestion. Unfortunately, it does not solve the mystery. I
>> installed the tool and used the search option to find references to the
>> file, but without result. I am not an expert in these things, but I tried
>> finding references to the file or its folder, etc. in various ways, but it
>> does not return any results.
>> Another thing that I observed is that I can rename the file, but if I do so,
>> the file is immediately recreated.
>
> What made you think it was "locked" in the first place? There's a
> Vista/Win7 FAQ that lets users edit administrator-owned files by
> silently redirecting them as soon as you make changes, but Apache sees
> the original.

Note it is more insidious than that.

Even the administrator is editing files as 'just a user' in the normal Windows 7
or Vista UAC environment. You actually have to create yourself a real admin
session to bring up these files in notepad or what have you.

Either set your notepad shortcut to 'run as user administrator' or you can just
launch an admin cmd.exe prompt (which isn't what happens when you run cmd.exe)
by either tagging the shortcut to run-as-user, or by invoking

runas /user:administrator "cmd.exe /k"


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: Locked Apache configuration file

am 20.03.2010 17:52:26 von Marc Buyens

Hello. Many thanks for this. I am new to W7 and wasn't aware of this.
This is clearly one more Bill Gates quirk. What's the use of assigning
administrator rights to users if they are not used? Anyway, you solved
my problem. Explicitly asking to run as administrator allows me to
change the file. It is a bit like confirming that I am still alive
before editing the file. Some form of technology progress, I assume, but
not a progress of human logic...

On 20/03/2010 17:22, William A. Rowe Jr. wrote:
> On 3/20/2010 9:48 AM, Eric Covener wrote:
>
>> On Sat, Mar 20, 2010 at 9:23 AM, Marc Buyens wrote:
>>
>>> Thanks for the suggestion. Unfortunately, it does not solve the mystery. I
>>> installed the tool and used the search option to find references to the
>>> file, but without result. I am not an expert in these things, but I tried
>>> finding references to the file or its folder, etc. in various ways, but it
>>> does not return any results.
>>> Another thing that I observed is that I can rename the file, but if I do so,
>>> the file is immediately recreated.
>>>
>> What made you think it was "locked" in the first place? There's a
>> Vista/Win7 FAQ that lets users edit administrator-owned files by
>> silently redirecting them as soon as you make changes, but Apache sees
>> the original.
>>
> Note it is more insidious than that.
>
> Even the administrator is editing files as 'just a user' in the normal Windows 7
> or Vista UAC environment. You actually have to create yourself a real admin
> session to bring up these files in notepad or what have you.
>
> Either set your notepad shortcut to 'run as user administrator' or you can just
> launch an admin cmd.exe prompt (which isn't what happens when you run cmd.exe)
> by either tagging the shortcut to run-as-user, or by invoking
>
> runas /user:administrator "cmd.exe /k"
>
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See 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
>
>
>

--
Marc Buyens
Analyst, Management Consultant& Managing Director

Xpragma bvba
Mechelsesteenweg 254
B-2820 Bonheiden
Belgium

tel. +32-(0)15-340 845
marc.buyens@xpragma.com
http://www.xpragma.com/


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: Locked Apache configuration file

am 20.03.2010 18:24:52 von wrowe

On 3/20/2010 11:52 AM, Marc Buyens wrote:
> Hello. Many thanks for this. I am new to W7 and wasn't aware of this.
> This is clearly one more Bill Gates quirk. What's the use of assigning
> administrator rights to users if they are not used? Anyway, you solved
> my problem. Explicitly asking to run as administrator allows me to
> change the file. It is a bit like confirming that I am still alive
> before editing the file. Some form of technology progress, I assume, but
> not a progress of human logic...

The 'workaround' would be for the installer to set up the shortcuts as 'requires
administrator privilege' - no password, no notepad.

But that's really a hack. Instead I'm just looking towards moving volatile,
configuration things out of c:/Program Files/ into - well that's where I'm
stuck. There's no /etc/ or /var/ on win32 ;-)

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: Locked Apache configuration file

am 20.03.2010 19:02:57 von Daniel Reinhardt

--------------------------------------------------
From: "William A. Rowe Jr."
Sent: 20 March, 2010 17:24
To:
Subject: Re: [users@httpd] Locked Apache configuration file

> On 3/20/2010 11:52 AM, Marc Buyens wrote:
>> Hello. Many thanks for this. I am new to W7 and wasn't aware of this.
>> This is clearly one more Bill Gates quirk. What's the use of assigning
>> administrator rights to users if they are not used? Anyway, you solved
>> my problem. Explicitly asking to run as administrator allows me to
>> change the file. It is a bit like confirming that I am still alive
>> before editing the file. Some form of technology progress, I assume, but
>> not a progress of human logic...
>
> The 'workaround' would be for the installer to set up the shortcuts as
> 'requires
> administrator privilege' - no password, no notepad.
>
> But that's really a hack. Instead I'm just looking towards moving volatile,
> configuration things out of c:/Program Files/ into - well that's where I'm
> stuck. There's no /etc/ or /var/ on win32 ;-)
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See 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
>

Wialliam,

Why not install Apache and other web serving stuff into a non-protected
directory like c:\usr\local\apache

You can customize your installation locations.

C:\Program Files is protected by the OS.


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: Locked Apache configuration file

am 20.03.2010 19:18:08 von wrowe

On 3/20/2010 1:02 PM, Daniel Reinhardt wrote:
>
> Why not install Apache and other web serving stuff into a non-protected
> directory like c:\usr\local\apache

My c:\usr is quite locked down, thank you very much :)

> You can customize your installation locations.

We already enable that in the MSI installer.

> C:\Program Files is protected by the OS.

C:\ Root is protected by the OS as well.

The point isn't to run it as a unix app on windows, but to be a first class
citizen. To do that, it's all about respecting conventions.

It appears that convention is now C:\ProgramData\Vendor\Application\

The idea moving fowards is there is only one copy of the program, by
default in the usual location, but the ability to install a skeleton
of a service (conf, logs, htdocs) anywhere, usually ProgramData as the
global/system server, but optionally a private-for-one-user flavor in
their own \Users\[username]\AppData\Local [or Roaming?]
profile, if they like. Still working this through.

Making win32 more unix-like doesn't help win32 folks become acquainted with
Apache, very much. But if you like to install everything under c:\opt\httpd
you are welcome to do that, instead :)

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: Locked Apache configuration file

am 21.03.2010 01:46:59 von Daniel Reinhardt

--------------------------------------------------
From: "William A. Rowe Jr."
Sent: 20 March, 2010 18:18
To:
Subject: Re: [users@httpd] Locked Apache configuration file

> On 3/20/2010 1:02 PM, Daniel Reinhardt wrote:
>>
>> Why not install Apache and other web serving stuff into a non-protected
>> directory like c:\usr\local\apache
>
> My c:\usr is quite locked down, thank you very much :)
>
>> You can customize your installation locations.
>
> We already enable that in the MSI installer.
>
>> C:\Program Files is protected by the OS.
>
> C:\ Root is protected by the OS as well.
>
> The point isn't to run it as a unix app on windows, but to be a first class
> citizen. To do that, it's all about respecting conventions.
>
> It appears that convention is now C:\ProgramData\Vendor\Application\
>
> The idea moving fowards is there is only one copy of the program, by
> default in the usual location, but the ability to install a skeleton
> of a service (conf, logs, htdocs) anywhere, usually ProgramData as the
> global/system server, but optionally a private-for-one-user flavor in
> their own \Users\[username]\AppData\Local [or Roaming?]
> profile, if they like. Still working this through.
>
> Making win32 more unix-like doesn't help win32 folks become acquainted with
> Apache, very much. But if you like to install everything under c:\opt\httpd
> you are welcome to do that, instead :)
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See 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
>

William,

You pretty much missed the entire point of my post, as it went clear over your
head. You can install anything you want and have it reside outside of
c:\program files and it would still work.

On 64bit Windows it comes with 2 Program Files and they are: c:\program files
which is for 64bit applications, and then there is c:\program files(x86)\ which
is for 32bit applications. There is no default or conventional way of
installing things on Windows or Linux.

Reread my reply to you a little bit slower, and you will see what I was trying
to say. THe directory path I was giving you as an example was just that an
example. I use WAMP Server, and I installed it on my D: drive under d:\apache2.

I am not making it more unix like.

Thanks,
Daniel


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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: Locked Apache configuration file

am 21.03.2010 02:06:53 von wrowe

On 3/20/2010 7:46 PM, Daniel Reinhardt wrote:
>
> --------------------------------------------------
> From: "William A. Rowe Jr."
> Sent: 20 March, 2010 18:18
> To:
> Subject: Re: [users@httpd] Locked Apache configuration file
>
>> On 3/20/2010 1:02 PM, Daniel Reinhardt wrote:
>>>
>>> Why not install Apache and other web serving stuff into a non-protected
>>> directory like c:\usr\local\apache
>>
>> My c:\usr is quite locked down, thank you very much :)
>>
>>> You can customize your installation locations.
>>
>> We already enable that in the MSI installer.
>>
>>> C:\Program Files is protected by the OS.
>>
>> C:\ Root is protected by the OS as well.
>>
>> The point isn't to run it as a unix app on windows, but to be a first
>> class
>> citizen. To do that, it's all about respecting conventions.
>>
>> It appears that convention is now C:\ProgramData\Vendor\Application\
>>
>> The idea moving fowards is there is only one copy of the program, by
>> default in the usual location, but the ability to install a skeleton
>> of a service (conf, logs, htdocs) anywhere, usually ProgramData as the
>> global/system server, but optionally a private-for-one-user flavor in
>> their own \Users\[username]\AppData\Local [or Roaming?]
>> profile, if they like. Still working this through.
>>
>> Making win32 more unix-like doesn't help win32 folks become acquainted
>> with
>> Apache, very much. But if you like to install everything under
>> c:\opt\httpd
>> you are welcome to do that, instead :)
>>
>> ------------------------------------------------------------ ---------
>> The official User-To-User support forum of the Apache HTTP Server
>> Project.
>> See 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
>>
>
> William,
>
> You pretty much missed the entire point of my post, as it went clear
> over your head. You can install anything you want and have it reside
> outside of c:\program files and it would still work.

Of course, that's why the installer lets you pick a path. [You did make the
connection that I authored the win32 installer, I presume?]

Program Files doesn't work for some, maybe they run scripts or apps that
don't respect spaces, or the (x86) trips up some parsers also.

And it's too much typing for me; besides a 'test install', all dozen or
so copies on my boxes are installed on short easy-to-type paths.

> On 64bit Windows it comes with 2 Program Files and they are: c:\program
> files which is for 64bit applications, and then there is c:\program
> files(x86)\ which is for 32bit applications. There is no default or
> conventional way of installing things on Windows or Linux.

There are conventions. On both. Choose from one of several, and even some
entirely erroneous conventions (e.g. wizbang should not be in the path
c:\program files\wizbang, but under c:\program files\wizsoft\wizbang\, but
plenty of apps do such nonsense). Conventions on Linux include /usr/local/app
or /opt/app or /usr/app, all depending on what one is trying to accomplish.
Of course you can install on c:\windows\system32, or /usr/bin, but this is
just a bad idea when it comes to migration or OS upgrades.

> Reread my reply to you a little bit slower, and you will see what I was
> trying to say. THe directory path I was giving you as an example was
> just that an example. I use WAMP Server, and I installed it on my D:
> drive under d:\apache2.

I did :) We don't disagree - that doesn't mean the user who keeps their
*programs* (easily replaced or upgraded) separate from backed-up important
customizations should have to use WAMP's pile-it-on model, or fight with
the default protections against the ASF installer. TMTOWTDI

The only thing I noticed in your comment is that I like to keep all
unix-ported apps and frameworks on the same drive letter; some more
primitive ports are just not so good with drive letters. Apache is fine
with them, but that doesn't mean all favorite cgi apps will be. [You
could also make a compelling argument for keeping it on a different
drive letter than the OS, for that very reason.]


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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