X-Spam-Check-By: sourceware.org From: "Dave Korn" To: Subject: RE: 1.5.21: Unable to copy/move autorun.inf on mapped drives Date: Tue, 12 Sep 2006 14:58:39 +0100 Message-ID: <029b01c6d673$8c70e5b0$a501a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk 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 12 September 2006 14:33, Brian Davidson wrote: > I have been using Cygwin for years to automatically produce > InstallShield installations for our company. After formatting my PC and > installing the latest available Cygwin release, I believe I have found a > very obscure bug which only seems to impact autorun.inf and only on > mapped drives. I could not reproduce this issue on a local drive with > the same or different autorun.inf file. Being in software QA, I have > tried as many scenarios as I could think of, but being human, I'm > willing to admit I may have missed something. The fact that cygwin and windows have different permissions schemes, most likely. > To reproduce: > 1. Create a folder on any drive > 2. Share that folder > 3. Map that folder to any available drive letter (i.e. net use X: > \\machinename\share) > 4. Using Windows Explorer, copy an autorun.inf file into this > directory. Is it the name of this file that matters, or the contents? Or is it the permissions? Or is it where I get it from? Does it matter whether the autorun.inf came from a CD or was somewhere on your HD already? Where did you get yours from. > 5. Open a Windows Command Prompt and cd to the mapped drive where the > file was placed. > 6. Type "ren autorun.inf test.txt" > > TEST 1: Proving the process works outside of Cygwin: > > 7. Type "copy test.txt autorun.inf". This should succeed and you wind > up with 2 identical files. Identical in all respects except perms, I'd bet. copy doesn't preserve the ACLs, it creates a new file using your user id's default ACL. You need to use xcopy with the `-O' option. > 8. Type "del autorun.inf" to revert the environment for the next test. > > TEST 2: Proving the process does not work in Cygwin: > > 9. Open Cygwin BASH shell > 10. cd to the mapped drive (/cygdrive/x for example) > 11. Type "cp test.txt autorun.inf". You should get a "Permission > denied" error. Nope, worked fine for me. Then again I created an empty .inf file by using cygwin's touch command. > As I said, I have used this process for years without incident. To work > around this, I chose to use subst and endure the consequences on > Windows, but this is a problem nonetheless. > > I would like to know if anyone else can (or has) reproduced this issue, > as I have not found anything specific on this in the newsgroups or > FAQ's. If you copied the .inf file from a CD, it will have ended up with the readonly attribute set. Check if that's making a difference. cheers, DaveK -- Can't think of a witty .sigline today.... -- 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/