delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/09/12/15:44:28

X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
Subject: RE: 1.5.21: Unable to copy/move autorun.inf on mapped drives
Date: Tue, 12 Sep 2006 21:48:10 +0200
Message-ID: <A6C3D35517D994408ABE92AAD373D50601D1D0C7@CSVS02.hosting.lan>
From: "Brian Davidson" <Brian DOT Davidson AT tiecommerce DOT com>
To: <cygwin AT cygwin DOT com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id k8CJiQQ4013626

Please disregard - the latest McAfee Virus Scan (Enterprise 8) flags
this file and is "trying" to protect hijacks.  It'd be nice if that got
logged somewhere.

Disabling my On-Demand Scan, I was able to create the file, rename,
move, etc.  So, this is a non-issue.  Thanks for your help though, Dave!

-----Original Message-----
From: Brian Davidson 
Sent: Tuesday, September 12, 2006 2:35 PM
To: 'cygwin AT cygwin DOT com'
Subject: RE: 1.5.21: Unable to copy/move autorun.inf on mapped drives

Dave -

I have confirmed that I can perform this action to remote network shares
without any problem, and I have simplified the test to "touch a ; mv a
autorun.inf" and it still gives me a permission denied error, so we can
rule out permissions I think.

It's file name specific, as I can do the same test with any other name
and have no problems.

For kicks, I made a C:\a share (different local drive from before), gave
it full NTFS permissions to everyone, shared it to everyone with full
control, and when I mapped my X: drive to it, I encountered the exact
same issue.  I can't loosen the permissions any more than that.

Any other ideas?

RE: 1.5.21: Unable to copy/move autorun.inf on mapped drives

    * From: "Dave Korn" <dave dot korn at artimi dot com>
    * To: <cygwin at cygwin dot com>
    * Date: Tue, 12 Sep 2006 14:58:39 +0100
    * Subject: RE: 1.5.21: Unable to copy/move autorun.inf on mapped
drives

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/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019