fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] Problem with cygwin and UNC path permissions


From: Thomas Coopman
Subject: Re: [Fab-user] Problem with cygwin and UNC path permissions
Date: Thu, 31 May 2012 14:39:49 +0200

After some more research I'm now almost completly sure that this isn't the problem.
My test was running a batch script with UNC paths. Running the batch script locally works fine, with fabric it fails...

On Wed, May 30, 2012 at 12:10 AM, Thomas Coopman <address@hidden> wrote:

I do not think this is a problem with escaped backslashes as in cygwin you can also use forward slashes.
Furthermore, I have tried to copy the executed command of fabric and running that directly works.

--
Thomas Coopman
address@hidden

Send from HTC Desire.

On May 29, 2012 6:43 PM, "Jeff Forcier" <address@hidden> wrote:
Hi Thomas,

On Tue, May 29, 2012 at 8:37 AM, Thomas Coopman
<address@hidden> wrote:
> Hi,

> For example:
> something like run("net use '\\unc\share' /user:thomas") will give me "The
> network name cannot be found.
> If I use ssh to connect to the server of the run config with the same user
> this works fine.

While I can't support this with direct experience, not using Windows
for systems tasks, my best guess here is that it's the backslashes
getting escaped or being treated as escape sequences, by Python itself
or at the Fabric level (we do some munging of commands to try and help
common issues.)

You should be able to verify this by looking at the output when an
error occurs -- Fabric should be showing both the "requested" and
"executed" versions of the command that blew up, with "executed"
showing the raw, escaped/modified/wrapped command.

If your command isn't actually erroring out, you can run with fab
--show=debug and it will print the "executed" version of run commands
in the "[host] run: <command>" lines, so that's another way to
sanity-check this.

At any rate, the first thing I'd try in your case if it does look like
the slashes aren't showing up right, is to use a Python 'raw' string
type, which will cause e.g. double-backslashes to show up correctly.
Simply slap a 'r' in front of the string literal, e.g.: run(r"net use
...").

Best,
Jeff

--
Jeff Forcier
Unix sysadmin; Python/Ruby engineer
http://bitprophet.org



--
Thomas Coopman
address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]