From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10032 invoked by alias); 2 Nov 2013 22:35:24 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 10020 invoked by uid 89); 2 Nov 2013 22:35:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=4.9 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,RDNS_NONE,SPF_SOFTFAIL,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: smtpback.ht-systems.ru Received: from Unknown (HELO smtpback.ht-systems.ru) (78.110.50.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Sat, 02 Nov 2013 22:35:19 +0000 Received: from [91.78.173.97] (helo=darkdragon.lan) by smtp.ht-systems.ru with esmtpa (Exim 4.80.1) (envelope-from ) id 1Vcjmf-0004PT-0N; Sun, 03 Nov 2013 02:35:09 +0400 Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Sat, 02 Nov 2013 22:26:20 -0000 Date: Sat, 02 Nov 2013 22:35:00 -0000 From: Andrey Repin Reply-To: Andrey Repin Message-ID: <1139549616.20131103022620@mtu-net.ru> To: "D. Boland" , cygwin@cygwin.com Subject: Re: vi stealing SYSTEM-owned permissions and ownership In-Reply-To: <52757448.81FE6C53@boland.nl> References: <5274F396.A133C4CE@boland.nl> <52757448.81FE6C53@boland.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-11/txt/msg00035.txt.bz2 Greetings, D. Boland! > First, in my student-setup, Apache is not running under Cygwin. I used the > .msi distribution, available on the Apache website. This installs Apache as a > native Windows Service, and it can be configured using the Windows Services > Control Panel. > As to running as the SYSTEM user, I agree with you. In Linux, Apache is started > by root, and then immediately switches to the "nobody" user, so it is unable > to touch or even see the outside of its ServerRoot. > In Windows, this mechanism does not work. That is why the "User" and "Group" > directives are left out of the httpd.conf file in the Windows distribution. > I now have Apache running under the username "Daemon" which I created using > the standard Windows "Users" Control Panel. I put this user in my "apache" > group like this: > net localgroup apache Daemon /add > The tricky part was assigning the following permissions to the "Daemon" > user: > * Log on as a service > * Act as part of the operating system > I did this in the "Local Security Settings" Control Panel, which can > be found in the "System Administration" Control Panel. It is also possible to > bring it up by running "secpol.msc" from the Start menu. > Finally, I configured Apache to run as user "Daemon" in the "Services" control > panel (services.msc). Your main problem is that you are trying to break into native Windows ACL system with Cygwin tools. And not only that, you also trying to wrest native ACLs into POSIX permissions, and expect native applications to work fine afterward. Which can be done theoretically, but in reality is a real big headache to maintain. If you truly want to show your students their Windows systems from the command line, I suggest you learn Windows command line. If not very robust, it is nonetheless rich, and allow for many operations normally performed from GUI, and some operations, that can not be done from GUI, either without much complication or at all. In the case mentioned below, the "net" tool should come in handy. As well as "sc" tool. Or, if you really want to use Cygwin tools to work along with Windows tools, use noacl mount option and let Windows care about control rights and stuff. Bottom line is: Either stick to Cygwin and leave Windows alone, or play by Windows rules. Also, forcing someone to use vi over more sane editors is a torture which no one deserve. -- WBR, Andrey Repin (anrdaemon@yandex.ru) 03.11.2013, <02:17> 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