GnuPG UNC path on windows problem

John Clizbe JPClizbe at tx.rr.com
Wed Oct 10 12:48:52 CEST 2007


Iron Sam Vane wrote:
> I'm attempting to encrypt a file on a remote server, both machines are
> win2k3 server, using this command:
> gpg --homedir c:\gnupg ---batch --trust-model always --output
> \\server\backups\archive1.7z.gpg -e -r user
> \\server\backups\archive1.7z
> 
> And I'm getting this error:
> 
> gpg: can't open `\\\\server\\backups\\archive1.7z': No such file or directory
> gpg: \\\\\\server\\backups\\archive1.7z: encryption failed: file open error
> 
> I've checked and the file (archive1.7z) isn't in use. Any ideas what's going on?

GnuPG for Windows is built with some translation code for Posix to Win32 path
conversion. The UNC paths are confusing it. The fact that backslash (\) needs to
be escaped (with a \) is causing the doubling of the characters.

a) Try putting the names in "double quotes", ie
    gpg --homedir c:\gnupg ---batch --trust-model always --output
    "\\server\backups\archive1.7z.gpg" -e -r user "\\server\backups\archive1.7z"

b) Try reversing the slashes (This works with non-UNC paths.)
    gpg --homedir c:\gnupg ---batch --trust-model always --output
      //server/backups/archive1.7z.gpg -e -r user //server/backups/archive1.7z

c) Use 'net use' and give \\server\backups a temporary drive letter
    net use x: \\server\backups
    gpg --homedir c:\gnupg ---batch --trust-model always --output
      x:\archive1.7z.gpg -e -r user x:\archive1.7z


-- 
John P. Clizbe                      Inet:   John (a) Mozilla-Enigmail.org
You can't spell fiasco without SCO. PGP/GPG KeyID: 0x608D2A10/0x18BB373A
"what's the key to success?"        / "two words: good decisions."
"what's the key to good decisions?" /  "one word: experience."
"how do i get experience?"          / "two words: bad decisions."

"Just how do the residents of Haiku, Hawai'i hold conversations?"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 663 bytes
Desc: OpenPGP digital signature
Url : /pipermail/attachments/20071010/3439968a/attachment.pgp 


More information about the Gnupg-users mailing list