public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Andrey Repin <anrdaemon@yandex.ru>
To: "D. Boland" <daniel@boland.nl>, cygwin@cygwin.com
Subject: Re: vi stealing SYSTEM-owned permissions and ownership
Date: Fri, 08 Nov 2013 20:20:00 -0000	[thread overview]
Message-ID: <109932942.20131109000917@mtu-net.ru> (raw)
In-Reply-To: <527CF337.DDA38C46@boland.nl>

Greetings, D. Boland!

>> > I think I have new information on the stealing of ownership. Below test has been
>> > performed on the Apache folder, placed in the Windows Program Files folder by the
>> > Apache msi installer:
>> >
>> > "/cygdrive/c/Program Files (x86)/Apache Group/Apache2/"
>> >
>> > But if I perform the same test in my Cygwin home directory, vi behaves beautifully.
>> >
>> > So, I was thinking this difference must be related to the Windows ACL assigments on
>> > the "Program Files" folder.
>> 
>> If you are operating as a normal user on this folder, you aren't
>> actually editing the files you think you see there, the whole contents
>> is virtualized by UAC and redirected to your own personal copy on edit.
>> If you want to keep your sanity, do not place anything that you intend
>> to edit / change as a normal user into system directories on Win7 (that
>> includes Cygwin itself).
>> 
>> http://msdn.microsoft.com/en-us/library/bb756960.aspx
>> 
>> Regards,
>> Achim.

> Thanks for this input. So Apache should be put in a folder, outside the windows

Erm, should be? Why? What made you think so?

> special folders, like:

> /cygdrive/c/Apache2

> This seems to be the default for most open source distributions: cygwin, perl, msys,
> mingw, even xampp.

XAMPP is a software collection, much like MSYS or Cygwin. It's easier to
maintain cross-application dependencies, where no other factors involved, but
I do not see, why XAMPP or MSYS would not live (relatively) peacefully inside
the %ProgramFiles% - they are both native Windows projects.
Cygwin is a bit specific, as it is aimed to cross the bridge between two
worlds. But the only real restriction so far was that it should not be
installed into a path with space anywhere in it's name. That's why C:/Cygwin
is a default location for it.
Perl (the distributions I've seen myself, other than Cygwin), live perfectly
fine in the %ProgramFiles%, so does MySQL, as well as it's tools, s.a. damned
WorkBench. 

> I am still wondering, though, why the Apache Foundation wants it
> in the "Program Files" folder.

Because they know what they are doing. And expect users to know, too.
%ProgramFiles% is a standard place for software installation in Windows.
And Apache httpd just play by the rules of the system.
Also, each Apache binary contain a manifest.

> You all are right in saying that the Apache .msi is a "hybrid" configuration.

It isn't. Or I do not understand the meaning of "hybrid" in this case.

> I guess, maybe it's better to just use the Apache installation provided by CygWin...

Depends, what you want to achieve.

> I also found out about "cygrunsrv". This makes Linux daemons run Windows-native.
> Very nice.

Not quite... As has been said already, there's implied limitations and
caveats, in many places. Just take the every-so-often reappearing topic of
setting up SSH server with Cygwin.

P.S.
Run this command from elevated shell:
reg ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /f /v "EnableVirtualization" /t REG_DWORD /d 0

That will deal with this stuff once and for all. Assuming you move the
"%LocalAppData%\VirtualStore" folders out of the way.
Once you reboot the system with this flag set, you will see "Access denied"
or "write failed", where they happen, no longer concealed by operating system
trying to outsmart the user.


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 08.11.2013, <23:32>

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  parent reply	other threads:[~2013-11-08 20:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-02 12:55 D. Boland
2013-11-02 13:36 ` Brian S. Wilson
2013-11-02 18:42   ` Andrey Repin
2013-11-02 21:58   ` D. Boland
2013-11-02 22:35     ` Andrey Repin
2013-11-03 18:47       ` D. Boland
2013-11-03 22:05         ` Andrey Repin
2013-11-04 11:23         ` Brian S. Wilson
2013-11-04 14:54           ` Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2013-11-04 17:05             ` Larry Hall (Cygwin)
2013-11-05  5:54 ` D. Boland
2013-11-05 17:38   ` Achim Gratz
2013-11-08 14:25     ` D. Boland
2013-11-08 15:59       ` Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2013-11-08 20:20       ` Andrey Repin [this message]
2013-11-27 18:11   ` D. Boland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=109932942.20131109000917@mtu-net.ru \
    --to=anrdaemon@yandex.ru \
    --cc=cygwin@cygwin.com \
    --cc=daniel@boland.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).