X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Tue, 17 Aug 2010 10:48:58 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Postinstall for mintty fails when installing "just for me" Message-ID: <20100817084858.GA16404@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <0105D5C1E0353146B1B222348B0411A20945256668 AT NIHMLBX02 DOT nih DOT gov> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Aug 17 06:52, Andy Koppe wrote: > On 17 August 2010 02:26, Buchbinder, Barry wrote: > > $ bash --norc --noprofile /etc/postinstall/mintty.sh > > /bin/mkdir: cannot create directory `/c/Documents and Settings/All Users/Start Menu/Programs/Cygwin': Permission denied > > mkshortcut: Saving "C:\Documents and Settings\All Users\Start Menu\Programs\Cygwin\mintty.lnk" failed; does the target directory exist? > > /bin/chmod: cannot access `/c/Documents and Settings/All Users/Start Menu/Programs/Cygwin/mintty.lnk': No such file or directory > > echo $? > > 1 > > Hmm, the test at the top of the script is meant to avoid that, by > checking whether the 'All Users/Start Menu/Programs' folder is > writable. Any idea why that's saying yes when apparently it isn't > writable? I tried your script and it works fine for me. If I'm running as admin in a UAC-restricted shell, the test fails as expected. The problem is, we don't know anything about your environment, Barry. cygcheck output as requested by http://cygwin.com/problems.html would be helpful, perhaps. As is getfacl/cacls output for the "/c/Documents and Settings/All Users/Start Menu/Programs" directory. > Is there a proper way for a postinstall script to find out whether > it's an install for all users or "Just Me"? Hmm, afaik no. You could try to write to All Users first and if that fails, write to the user's own Programs. Or, you could combine this with a call to `id -G' and test if the group 544 is in the users supplementary group list. But, maybe we should define a couple of useful, installation-specific arguments for postinstall scripts and change setup accordingly? Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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