# Error in rclone rc copyfile command

**URL:** <https://forum.rclone.org/t/error-in-rclone-rc-copyfile-command/7908>\
**Category:** Help and Support\
**Created:** [December 10, 2018, 10:03am UTC](https://forum.rclone.org/t/error-in-rclone-rc-copyfile-command/7908 "2018-12-10T10:03:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Song](https://forum.rclone.org/user_avatar/forum.rclone.org/david_song/32/2148_2.png) [@David\_Song](https://forum.rclone.org/u/David_Song)\
**Post date:** [December 10, 2018, 10:03am UTC](https://forum.rclone.org/t/error-in-rclone-rc-copyfile-command/7908/1 "2018-12-10T10:03:33Z")

</div>

Hello. I am new to rclone and trying to use rclone rc commands.

While I was trying to figure it out from the document ( [https://rclone.org/rc/](https://rclone.org/rc/) )

operation/copy functions seems not work.  
when running copyfile command. new file is not copied to the remote destination but new file is created on my instance file system.

All commands are executed on the same linux vm using two terminal sessions, one to start rclone server and another for running rclone rc command.

#### Step 1) Run rclone server with rclone rcd command

```auto
ubuntu@aws-s3-data:~$ rclone -vv rcd awsS3:dstg-test --rc-pass rpassword --rc-serve --rc-user ruser

```

#### Step 2) Run rclone rc operation/copyfile

```auto
ubuntu@aws-s3-data:~$ rclone -vv rc operations/copyfile srcFs=awsS3: srcRemote=/dstg-test/my-test/README.md dstFs=awsS3 dstRemote=/dstg-test/my-test/copyTest --user ruser --pass rpassword 
2018/12/10 18:35:04 DEBUG : rclone: Version "v1.45" starting with parameters ["rclone" "-vv" "rc" "operations/copyfile" "srcFs=awsS3:" "srcRemote=/dstg-test/my-test/README.md" "dstFs=awsS3" "dstRemote=/dstg-test/my-test/copyTest" "--user" "ruser" "--pass" "rpassword"]
{}
2018/12/10 18:35:05 DEBUG : 4 go routines active
2018/12/10 18:35:05 DEBUG : rclone: Version "v1.45" finishing with parameters ["rclone" "-vv" "rc" "operations/copyfile" "srcFs=awsS3:" "srcRemote=/dstg-test/my-test/README.md" "dstFs=awsS3" "dstRemote=/dstg-test/my-test/copyTest" "--user" "ruser" "--pass" "rpassword"]

```

#### Message from rclone server

```auto
2018/12/10 18:35:04 DEBUG : rc: "operations/copyfile": with parameters map[dstFs:awsS3 dstRemote:/dstg-test/my-test/copyTest srcFs:awsS3: srcRemote:/dstg-test/my-test/README.md]
2018/12/10 18:35:05 DEBUG : /dstg-test/my-test/README.md: Couldn't find file - need to transfer
2018/12/10 18:35:05 INFO : /dstg-test/my-test/README.md: Copied (new)
2018/12/10 18:35:05 DEBUG : rc: "operations/copyfile": reply map[]: <nil>

```

#### Step 3) Check if file is copied from s3 ( fail… )

```auto
ubuntu@aws-s3-data:~$ rclone -vv ls awsS3:dstg-test/my-test/README.md
2018/12/10 18:35:59 DEBUG : rclone: Version "v1.45" starting with parameters ["rclone" "-vv" "ls" "awsS3:dstg-test/my-test/README.md"]
2018/12/10 18:35:59 DEBUG : Using config file from "/home/ubuntu/.config/rclone/rclone.conf"
2018/12/10 18:35:59 DEBUG : pacer: Reducing sleep to 0s
     4857 README.md
2018/12/10 18:35:59 DEBUG : 4 go routines active
2018/12/10 18:35:59 DEBUG : rclone: Version "v1.45" finishing with parameters ["rclone" "-vv" "ls" "awsS3:dstg-test/my-test/README.md"]

ubuntu@aws-s3-data:~$ rclone -vv ls awsS3:dstg-test/my-test/copyTest
2018/12/10 18:36:07 DEBUG : rclone: Version "v1.45" starting with parameters ["rclone" "-vv" "ls" "awsS3:dstg-test/my-test/copyTest"]
2018/12/10 18:36:07 DEBUG : Using config file from "/home/ubuntu/.config/rclone/rclone.conf"
2018/12/10 18:36:07 DEBUG : pacer: Reducing sleep to 0s
2018/12/10 18:36:07 DEBUG : 4 go routines active
2018/12/10 18:36:07 DEBUG : rclone: Version "v1.45" finishing with parameters ["rclone" "-vv" "ls" "awsS3:dstg-test/my-test/copyTest"]

```

#### file is created on my instance, not the awsS3 bucket.

```auto
ubuntu@aws-s3-data:~$ ls -trl awsS3/
total 4
drwxrwxr-x 3 ubuntu ubuntu 4096 Dec 10 18:59 dstg-test
ubuntu@aws-s3-data:~$ tree awsS3/
awsS3/
└── dstg-test
    └── my-test
        └── copyTest

2 directories, 1 file
ubuntu@aws-s3-data:~$

```

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [December 10, 2018, 2:30pm UTC](https://forum.rclone.org/t/error-in-rclone-rc-copyfile-command/7908/2 "2018-12-10T14:30:59Z")

</div>

> [@David\_Song](#):
>
> ubuntu@aws-s3-data:~$ rclone -vv rc operations/copyfile srcFs=awsS3: srcRemote=/dstg-test/my-test/README.md dstFs=awsS3 dstRemote=/dstg-test/my-test/copyTest --user ruser --pass rpassword

This is missing a `:` on the end `dstFs=awsS3` - I think that is the problem.

---

<div class="post-metadata">

**Author:** ![David\_Song](https://forum.rclone.org/user_avatar/forum.rclone.org/david_song/32/2148_2.png) [@David\_Song](https://forum.rclone.org/u/David_Song)\
**Post date:** [December 11, 2018, 12:04am UTC](https://forum.rclone.org/t/error-in-rclone-rc-copyfile-command/7908/3 "2018-12-11T00:04:51Z")

</div>

Thank you for your reply.  
I’ve tried adding : on the end of dstFs=awsS3 . but still it failed to copy file.

```auto
ubuntu@aws-s3-data:~$ rclone -vv rc operations/copyfile srcFs=awsS3: srcRemote=/dstg-test/my-test/README.md dstFs=awsS3: dstRemote=/dstg-test/my-test/copyTest --user ruser --pass rpassword 
2018/12/11 08:53:32 DEBUG : rclone: Version "v1.45" starting with parameters ["rclone" "-vv" "rc" "operations/copyfile" "srcFs=awsS3:" "srcRemote=/dstg-test/my-test/README.md" "dstFs=awsS3:" "dstRemote=/dstg-test/my-test/copyTest" "--user" "ruser" "--pass" "rpassword"]
2018/12/11 08:53:32 Failed to rc: Failed to read rc response: 500 Internal Server Error: {
	"error": "MethodNotAllowed: Method Not Allowed\n\tstatus code: 405, request id: B247AC1C211BDF1A, host id: Vq403xg3M/NA3O8LvrTusIvS9TaybNdzk0HTbibMzDmb9EWh2tQuKOFAoZ/TsGIVBfoDjXeRSUA=",
	"input": {
		"dstFs": "awsS3:",
		"dstRemote": "/dstg-test/my-test/copyTest",
		"srcFs": "awsS3:",
		"srcRemote": "/dstg-test/my-test/README.md"
	},
	"path": "operations/copyfile",
	"status": 500
}

```

```auto
ubuntu@aws-s3-data:~$ 2018/12/11 08:53:32 DEBUG : rc: "operations/copyfile": with parameters map[dstFs:awsS3: dstRemote:/dstg-test/my-test/copyTestsrcFs=awsS3:dstg-test/my-test srcRemote=README.md]
2018/12/11 08:53:32 DEBUG : pacer: Reducing sleep to 0s
2018/12/11 08:53:32 DEBUG : /dstg-test/my-test/README.md: Couldn't find file - need to transfer
2018/12/11 08:53:32 ERROR : /dstg-test/my-test/README.md: Failed to copy: MethodNotAllowed: Method Not Allowed
	status code: 405, request id: B247AC1C211BDF1A, host id: Vq403xg3M/NA3O8LvrTusIvS9TaybNdzk0HTbibMzDmb9EWh2tQuKOFAoZ/TsGIVBfoDjXeRSUA=
2018/12/11 08:53:32 ERROR : rc: "operations/copyfile": error: MethodNotAllowed: Method Not Allowed
	status code: 405, request id: B247AC1C211BDF1A, host id: Vq403xg3M/NA3O8LvrTusIvS9TaybNdzk0HTbibMzDmb9EWh2tQuKOFAoZ/TsGIVBfoDjXeRSUA=

```

instead, I’ve changed parameters.  
adding directory path to the end of srcFS and using only filename for the srcRemote.

`srcFs= awsS3 ==> awsS3:dstg-test/my-test`  
`srcRemote=dstg-test/my-test/README.md ==> README.md`

and this one is working. maybe I’ve got it wrong about using parameters.

```auto
ubuntu@aws-s3-data:~$ rclone -vv rc operations/copyfile srcFs=awsS3:dstg-test/my-test srcRemote=README.md dstFs=awsS3:dstg-test/my-test dstRemote=copyTest --user ruser --pass rpassword 
2018/12/11 08:55:31 DEBUG : rclone: Version "v1.45" starting with parameters ["rclone" "-vv" "rc" "operations/copyfile" "srcFs=awsS3:dstg-test/my-test" "srcRemote=README.md" "dstFs=awsS3:dstg-test/my-test" "dstRemote=copyTest" "--user" "ruser" "--pass" "rpassword"]
{}
2018/12/11 08:55:31 DEBUG : 4 go routines active
2018/12/11 08:55:31 DEBUG : rclone: Version "v1.45" finishing with parameters ["rclone" "-vv" "rc" "operations/copyfile" "srcFs=awsS3:dstg-test/my-test" "srcRemote=README.md" "dstFs=awsS3:dstg-test/my-test" "dstRemote=copyTest" "--user" "ruser" "--pass" "rpassword"]
ubuntu@aws-s3-data:~/sr-ceph/dstg-bucket$ 

```

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [December 12, 2018, 9:29pm UTC](https://forum.rclone.org/t/error-in-rclone-rc-copyfile-command/7908/4 "2018-12-12T21:29:46Z")

</div>

> [@David\_Song](#):
>
> instead, I’ve changed parameters.  
> adding directory path to the end of srcFS and using only filename for the srcRemote.

Yes you'll need the bucket in the `srcFs` and `dstFs` otherwise you'll get that `MethodNotAllowed` error.

I forgot about that - sorry!

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [March 4, 2020, 12:49am UTC](https://forum.rclone.org/t/error-in-rclone-rc-copyfile-command/7908/5 "2020-03-04T00:49:44Z")

</div>

Closed on March 4, 2020, 12:49am UTC


