This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: vi stealing SYSTEM-owned permissions and ownership


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]