X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=vskYPutyVJ0jUzCq Olzbl56W+766r4NujJChkl/ZcRp9W8i7B+Qi2kaJKehdn5Q4xSZhIhzUVuOX8qql t88yVRcmnwIH4cgirwMc9hB6aA/BSvY+CmPaGpjcScFAZEqWUNMECXEUtk62LDce XQJKwMkkiUs+Kd0wY2FmXXkJwH4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=default; bh=MFb8skOvDutV1JSk7haU6W NEWKQ=; b=CWLU+KQanQSj+bjAUOAwwXIBFMyzd/f7GOohBm4nBzGV9UIY8O74AT YnuINxcm2lJ1T9/P2qp1XqFffhXIqpYddI+yZzUj0eghjlEKYwQ9GVL6i5tb4/Jk DsPS9E2c41XBBpKiFCDD1qUCkG+rZkZkq7AtNU60YsBJq5MxcKcbU= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 Date: Sun, 3 Nov 2013 02:26:20 +0400 From: Andrey Repin Reply-To: Andrey Repin Message-ID: <1139549616.20131103022620@mtu-net.ru> To: "D. Boland" , cygwin AT cygwin DOT com Subject: Re: vi stealing SYSTEM-owned permissions and ownership In-Reply-To: <52757448.81FE6C53@boland.nl> References: <5274F396 DOT A133C4CE AT boland DOT nl> <52757448 DOT 81FE6C53 AT boland DOT nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 AT yandex DOT 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