X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Eric Blake Subject: Re: [1.7] chmod fails with windows path Date: Mon, 15 Dec 2008 20:44:38 +0000 (UTC) Lines: 29 Message-ID: References: <4946A1DF DOT 9020601 AT spiresoftware DOT com> <20081215185705 DOT GB6830 AT calimero DOT vinschen DOT de> <4946B8C4 DOT 5070100 AT byu DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes 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 Eric Blake byu.net> writes: > > Eric Blake byu.net> writes: > > > Or, more accurately, a limitation of the coreutils .exe magic getting > > thrown off by the switch to the new cygwin_conv_path. > > On further thought, chmod doesn't do .exe magic to begin with (cp, mv, and ln > do, but not chmod). Maybe the culprit is the fact that coreutils uses fchmodat > rather than chmod? Yep. I stepped through chmod(1) in the debugger, and this call failed: fchmodat(AT_FDCWD, "c:/blah", 0755, 0); even though I previously created "/cygdrive/c/blah". It looks like gen_full_path_at is to blame; it is not recognizing DOS-style absolute paths; it tries to construct {cygheap->cwd.posix}"/c:/blah" rather than "c:/blah", and since "./c:" is not a directory, you get the failure. Which means I don't have to change anything in coreutils, but cygwin1.dll does need a refresh. -- Eric Blake -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/