rajesh.g
(Rajesh)
November 30, 2020, 8:56am
1
I am using rclone config create
to create remote -
rclone config create 5e7b896190ef80a3ed3d4674-ftp ftp host XXX.XXX.XXX.XXX user user@example.in pass ?faZsBEuNY$x
and then to transfer file -
rclone copy --stats-one-line /abc.txt 5e7b896190ef80a3ed3d4674-ftp:/abc -P --no-traverse
It throws error - "Failed to create file system for "5e7b896190ef80a3ed3d4674-ftp:/abc": NewFs: ftpConnection Login: 530 Login authentication failed"
However, same works fine when rclone remote created interactively.
I have even tried by passing option --obscure
rclone config create 5e7b896190ef80a3ed3d4674-ftp ftp host XXX.XXX.XXX.XXX user user@example.in pass ?faZsBEuNY$x --obscure
What is the problem you are having with rclone?
There is some issue only with specific passwords (with some special chars).
What is your rclone version (output from rclone version
)
rclone v1.53.2
os/arch: linux/amd64
go version: go1.15.3
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Linux TESTNODE1-DEV 4.15.0-1098-azure #109~16.04.1-Ubuntu SMP Wed Sep 30 18:53:14 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Which cloud storage system are you using? (eg Google Drive)
FTP / SFTP
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone config create 5e7b896190ef80a3ed3d4674-ftp ftp host XXX.XXX.XXX.XXX user user@example.in pass ?faZsBEuNY$x
rclone copy --stats-one-line /abc.txt 5e7b896190ef80a3ed3d4674-ftp:/abc -P --no-traverse
The rclone config contents with secrets removed.
[5e7b896190ef80a3ed3d4674-ftp]
type = ftp
user = user@example.in
pass = cC6W-jc9WtV2caO9WPZJ3AZmigQ8bfWyqkc
host = XXX.XXX.XXX.XXX
A log from the command with the -vv
flag
2020/11/30 08:54:45 DEBUG : rclone: Version "v1.53.2" starting with parameters ["rclone" "copy" "--stats-one-line" "/abc.txt" "5e7b896190ef80a3ed3d4674-ftp:/abc” "-P" "--no-traverse" "-vv"]
2020/11/30 08:54:45 DEBUG : Creating backend with remote "/abc.txt"
2020/11/30 08:54:45 DEBUG : Using config file from "/.config/rclone/rclone.conf"
2020/11/30 08:54:45 DEBUG : fs cache: adding new entry for parent of "/abc.txt", "/"
2020/11/30 08:54:45 DEBUG : Creating backend with remote "5e7b896190ef80a3ed3d4674-ftp:/abc”
2020/11/30 08:54:45 DEBUG : ftp://XXX.XXX.XXX.XXX:21/abc: Connecting to FTP server
2020/11/30 08:54:50 ERROR : ftp://XXX.XXX.XXX.XXX:21/abc: Error while Logging in into XXX.XXX.XXX.XXX:21: 530 Login authentication failed
2020/11/30 08:54:50 Failed to create file system for "5e7b896190ef80a3ed3d4674-ftp:/a”bc: NewFs: ftpConnection Login: 530 Login authentication failed
Rclone is assuming you have an obscured password.
You can use:
--no-obscure Force any passwords not to be obscured.
--obscure Force any passwords to be obscured.
To force it to how you want.
rajesh.g
(Rajesh)
November 30, 2020, 12:38pm
3
Thanks for prompt reply.
I have already tried options --obscure
and --no-obscure
but rclone copy errored Login: 530 Login authentication failed
.
I have 8 remotes and out of 8, 4 are working fine and 4 are failing due to the password. For some remote, rclone is assuming password is obscured and for some, it is not.
Can you share specifically what you are running and the output of the commands/rclone.conf?
Based on your first post, you gave no indication you tried that.
rajesh.g
(Rajesh)
November 30, 2020, 1:13pm
5
I had added very detailed information in my post and about the options --obscure
. It even had the information what I did.
Anyways, If I run following command -
rclone config create 5e7b896190ef80a3ed3d4674-ftp ftp host XXX.XXX.XXX.XXX user user@example.in pass ?faZsBEuNY$x
It creates rclone config. Then I use following rclone copy command to copy file to the remote created in the previous command -
rclone copy --stats-one-line /abc.txt 5e7b896190ef80a3ed3d4674-ftp:/abc -P --no-traverse
and it failed with error Failed to create file system for "5e7b896190ef80a3ed3d4674-ftp:/abc": NewFs: ftpConnection Login: 530 Login authentication failed
.
Interestingly, if I create config interactively for the same credentials, rclone copy
works fine.
Is the password you are passing obscured or is it the actual password?
rajesh.g
(Rajesh)
November 30, 2020, 1:20pm
7
Actual password. and it is encrypted and shown as config
[5e7b896190ef80a3ed3d4674-ftp]
type = ftp
host = XXX.XXX.XXX.XXX
user = user@example.in
pass = N4dI1ZxDLo3Xlt8ER-tGeQvVmFUVY440NOc
This works fine for me:
rclone config create test-sftp sftp host localhost user test pass ?faZsBEuNY$x -vv --obscure
If you can please share the debug output:
felix@guardian:/opt/rclone$ rclone config create test-sftp sftp host localhost user test pass ?faZsBEuNY$x -vv --obscure2020/11/30 08:25:41 DEBUG : rclone: Version "v1.52.3" starting with parameters ["rclone" "config" "create" "test-sftp" "sftp" "host" "localhost" "user" "test" "pass" "?faZsBEuNY" "-vv" "--obscure"]
2020/11/30 08:25:41 DEBUG : Using config file from "/opt/rclone/rclone.conf"
Remote config
--------------------
[test-sftp]
type = sftp
host = localhost
user = test
pass = *** ENCRYPTED ***
--------------------
2020/11/30 08:25:41 DEBUG : rclone: Version "v1.52.3" finishing with parameters ["rclone" "config" "create" "test-sftp" "sftp" "host" "localhost" "user" "test" "pass" "?faZsBEuNY" "-vv" "--obscure"]
and a test works fine.
felix@guardian:/opt/rclone$ rclone about test-sftp:
Total: 232.270G
Used: 127.933G
Free: 104.337G
rajesh.g
(Rajesh)
November 30, 2020, 1:27pm
9
This scenario should be easily reproducible by creating one ftp account and set its password to ?faZsBEuNY$x
Create a rclone config using command -
rclone config create 5e7b896190ef80a3ed3d4674-ftp ftp host XXX.XXX.XXX.XXX user user@example.in pass ?faZsBEuNY$x
And then following command to copy
rclone copy --stats-one-line /abc.txt 5e7b896190ef80a3ed3d4674-ftp:/abc -P --no-traverse
rajesh.g
(Rajesh)
November 30, 2020, 1:29pm
10
Can you please try ftp
instead of sftp
Works fine:
felix@guardian:/opt/rclone$ rclone config create test-ftp ftp host 192.168.1.30 user test pass ?faZsBEuNY$x -vv --obscur
e
2020/11/30 08:34:14 DEBUG : rclone: Version "v1.52.3" starting with parameters ["rclone" "config" "create" "test-ftp" "ftp" "host" "192.168.1.30" "user" "test" "pass" "?faZsBEuNY" "-vv" "--obscure"]
2020/11/30 08:34:14 DEBUG : Using config file from "/opt/rclone/rclone.conf"
Remote config
--------------------
[test-ftp]
type = ftp
pass = *** ENCRYPTED ***
host = 192.168.1.30
user = test
--------------------
2020/11/30 08:34:14 DEBUG : rclone: Version "v1.52.3" finishing with parameters ["rclone" "config" "create" "test-ftp" "ftp" "host" "192.168.1.30" "user" "test" "pass" "?faZsBEuNY" "-vv" "--obscure"]
felix@guardian:/opt/rclone$ rclone ls test-ftp:
0 blah
rajesh.g
(Rajesh)
November 30, 2020, 1:36pm
12
rclone config create 5e7b896190ef80a3ed3d4674-ftp ftp host XXX.XXX.XXX.XXX user user@example.in pass ?faZsBEuNY$x -vv --obscure
Output -
2020/11/30 13:31:46 DEBUG : rclone: Version "v1.53.2" starting with parameters ["rclone" "config" "create" "5e7b896190ef80a3ed3d4674-ftp" "ftp" "host" "XXX.XXX.XXX.XXX" "user" "user@example.in" "pass" "?faZsBEuNY" "-vv" "--obscure"]
2020/11/30 13:31:46 DEBUG : Using config file from "/.config/rclone/rclone.conf"
Remote config
--------------------
[5e7b896190ef80a3ed3d4674-ftp]
type = ftp
host = XXX.XXX.XXX.XXX
user = user@example.in
pass = *** ENCRYPTED ***
--------------------
2020/11/30 13:31:46 DEBUG : rclone: Version "v1.53.2" finishing with parameters ["rclone" "config" "create" "5e7b896190ef80a3ed3d4674-ftp" "ftp" "host" "XXX.XXX.XXX.XXX" "user" "user@example.in" "pass" "?faZsBEuNY" "-vv" "--obscure"]
Test
$ rclone about 5e7b896190ef80a3ed3d4674-ftp: -vv
Output -
2020/11/30 13:31:59 DEBUG : rclone: Version "v1.53.2" starting with parameters ["rclone" "about" "5e7b896190ef80a3ed3d4674-ftp:" "-vv"]
2020/11/30 13:31:59 DEBUG : Using config file from "/.config/rclone/rclone.conf"
2020/11/30 13:31:59 DEBUG : Creating backend with remote "5e7b896190ef80a3ed3d4674-ftp:"
2020/11/30 13:31:59 DEBUG : ftp://XXX.XXX.XXX.XXX:21: Connecting to FTP server
2020/11/30 13:32:04 ERROR : ftp://XXX.XXX.XXX.XXX:21: Error while Logging in into XXX.XXX.XXX.XXX:21: 530 Login authentication failed
2020/11/30 13:32:04 Failed to create file system for "5e7b896190ef80a3ed3d4674-ftp:": NewFs: ftpConnection Login: 530 Login authentication failed
And you can login with the same user and password on the command line?
felix@guardian:/opt/rclone$ ftp 192.168.1.30
Connected to 192.168.1.30.
220 (vsFTPd 3.0.3)
Name (192.168.1.30:felix): test
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
My test machine has an old version so to make sure, it works on the current stable as well:
felix@guardian:/opt/rclone$ rclone config create test-ftp ftp host 192.168.1.30 user test pass ?faZsBEuNY$x -vv --obscure
2020/11/30 08:39:40 DEBUG : rclone: Version "v1.53.3" starting with parameters ["rclone" "config" "create" "test-ftp" "ftp" "host" "192.168.1.30" "user" "test" "pass" "?faZsBEuNY" "-vv" "--obscure"]
2020/11/30 08:39:40 DEBUG : Using config file from "/opt/rclone/rclone.conf"
Remote config
--------------------
[test-ftp]
type = ftp
host = 192.168.1.30
user = test
pass = *** ENCRYPTED ***
--------------------
2020/11/30 08:39:40 DEBUG : rclone: Version "v1.53.3" finishing with parameters ["rclone" "config" "create" "test-ftp" "ftp" "host" "192.168.1.30" "user" "test" "pass" "?faZsBEuNY" "-vv" "--obscure"]
felix@guardian:/opt/rclone$ rclone ls test-ftp:
0 blah
rajesh.g
(Rajesh)
November 30, 2020, 1:43pm
15
So, the issue is -
Password entered was - ?faZsBEuNY$x
But it was converted by rclone. In the DEBUG it is - ?faZsBEuNY
2020/11/30 13:31:46 DEBUG : rclone: Version "v1.53.2" starting with parameters ["rclone" "config" "create" "5e7b896190ef80a3ed3d4674-ftp" "ftp" "host" "XXX.XXX.XXX.XXX" "user" "user@example.in" "pass" "?faZsBEuNY" "-vv" "--obscure"]
Can you paste the password you are using in a code block?
-?faZsBEuNY
This?
rajesh.g
(Rajesh)
November 30, 2020, 2:00pm
17
Password provided was -
?faZsBEuNY$x
But it was converted by rclone to
?faZsBEuNY
It trimmed
$x
Please check output in debug -
2020/11/30 13:31:46 DEBUG : rclone: Version "v1.53.2" starting with parameters ["rclone" "config" "create" "5e7b896190ef80a3ed3d4674-ftp" "ftp" "host" "XXX.XXX.XXX.XXX" "user" "user@example.in" "pass" "?faZsBEuNY" "-vv" "--obscure"]
Yep, that does seem to be it.
I'd open an issue and reference the steps to recreate / the forum post here as that seems to be a bug.
1 Like
Is it not the shell playing a trick here, treating $x
as a variable, expanding it to empty string?
1 Like
Oh good point.
If you escape it, it should work:
felix@guardian:/opt/rclone$ rclone config create test-ftp ftp host 192.168.1.30 user test pass "?faZsBEuNY\$x" -vv --obs
cure
2020/11/30 10:13:42 DEBUG : rclone: Version "v1.53.3" starting with parameters ["rclone" "config" "create" "test-ftp" "ftp" "host" "192.168.1.30" "user" "test" "pass" "?faZsBEuNY$x" "-vv" "--obscure"]
2020/11/30 10:13:42 DEBUG : Using config file from "/opt/rclone/rclone.conf"
Remote config
--------------------
[test-ftp]
type = ftp
host = 192.168.1.30
user = test
pass = *** ENCRYPTED ***
--------------------
2020/11/30 10:13:42 DEBUG : rclone: Version "v1.53.3" finishing with parameters ["rclone" "config" "create" "test-ftp" "ftp" "host" "192.168.1.30" "user" "test" "pass" "?faZsBEuNY$x" "-vv" "--obscure"]
2 Likes