login about faq

I am receiving the following error message when I try to use a password file. This command works when I use the password instead of file. This is on a Windows system.

call sftpg3.exe -B wftp_script.txt --password=file://C:Scriptbinwftp_pw.txt

Failed to get password: File C:Scriptbinwftp_pw.txt couldn't be read: faulty permissions.

Thie is a file I have created in the same directory I am running in. So its not a file that cannot be read. -rw-rw-rw- 1 user 0 8 2012-01-05 12:45 C:Scriptbinwftp_pw.txt

asked Jan 05 '12 at 20:34

gil's gravatar image

gil
1223


Please see the answer to question: Failed to get password: File

link

answered Jan 05 '12 at 21:46

Martin%20Dobsik's gravatar image

Martin Dobsik ♦
599126

The only people that can logon are part of the admin group. So access to this file is very limited.

link

answered Jan 05 '12 at 22:17

gil's gravatar image

gil
1223

It is the Access Control List on the file itself that must allow access to the password file only for the current user (It can be set in Windows Explorer). It may also contain group of administrators and SYSTEM account. Otherwise the reading of password file will fail.

Unfortunately, this test cannot be disabled.

There is, however, the third alternative: --password=extprog://PROG, which let's you to surpass the security check. Use this command:

call sftpg3.exe -B wftp_script.txt --password=extprog://C:\test\my.bat

The content of the file C:\test\my.bat is:

@echo off
type C:\test\Scriptbinwftp_pw.txt

It works for me too (Tectia SSH Client 6.2.2).

With regards and hope this could help,

Martin

link

answered Jan 05 '12 at 22:53

Martin%20Dobsik's gravatar image

Martin Dobsik ♦
599126

edited Jan 05 '12 at 22:54

Work. this also works:

my.bat file value @echo password or set mypw=password set this else where in a different script sftp batch script @echo off sftpg2 stuff --password=%mypw%

thanks Gil

link

answered Jan 05 '12 at 23:25

gil's gravatar image

gil
1223

edited Jan 06 '12 at 00:00

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×21
×17

Asked: Jan 05 '12 at 20:34

Seen: 5,179 times

Last updated: Jan 06 '12 at 00:00

All user contributed content licensed under the cc-by-sa license.
Powered by OSQA.