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: Jeff Forcier
Subject: Re: [Fab-user] Problem with cygwin and UNC path permissions
Date: Tue, 29 May 2012 09:43:19 -0700

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



reply via email to

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