What is the problem you are having with rclone?
I'm using rclone as peertube storage via rclone mount. Background jobs crash due to EPERM exception.
The mount is established correctly, and can be read and written to, from the user in question.
I'm able to reproduce the error message from the shell. A file touch or a 'cp' works without error. When using 'mv' for the same operation, this (below) warning is printed to the shell. See the following terminal session:
$ touch test1
$ cp test1 /rclonevol/ # <- works
$ mv test1 /rclonevol/test2 # <- emits warnings below
mv: preserving times for '/rclonevol/test2': Operation not permitted
mv: preserving permissions for ‘/rclonevol/test2’: Operation not permitted
$ echo $? # does this produce error exit code? - no
0
$ ll /rclonevol/ # both operations seem successful
total 4
drwxrwxrwx 1 root root 0 Jan 25 15:17 ./
drwxr-xr-x 20 root root 4096 Jan 25 10:47 ../
drwxrwxrwx 1 root root 0 Jan 25 15:25 storage/
-rw-rw-rw- 1 root root 0 Jan 25 15:17 test1
-rw-rw-rw- 1 root root 0 Jan 25 15:17 test2
I'm just assuming at this stage that the warning above is related to the error, because the message is the same wording when node.js raises it ('operation not permitted', EPERM).
In the shell it's not changing the shell operations exit code to non-zero, but node might map this differently to an error state.
At any rate, I'd like to understand and remove the cause for this permission warning.
What is your rclone version (output from rclone version
)
$ rclone version
rclone v1.53.4
- os/arch: linux/amd64
- go version: go1.15.6
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Ubuntu 20.04.1 LTS 64bit
Which cloud storage system are you using? (eg Google Drive)
DigitalOcean
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
Jan 25 15:17:56 prototube rclone[36072]: 2021/01/25 15:17:56 DEBUG : rclone: Version "v1.53.4"
starting with parameters [
"/usr/bin/rclone" "mount" "dospace:/peertube-space" "/rclonevol" "-vv"
"--config=/var/lib/rclone/.config/rclone/rclone.conf"
"--allow-other"
"--allow-root"
"--default-permissions"
"--cache-tmp-upload-path=/tmp/rclone/root/dospace/upload"
"--cache-chunk-path=/tmp/rclone/root/dospace/chunks"
"--cache-workers=8"
"--cache-writes"
"--cache-dir=/tmp/rclone/root/dospace/vfs"
"--cache-db-path=/tmp/rclone/root/dospace/db"
"--no-seek"
"--no-modtime"
"--stats=1m"
"--checkers=16"
"--bwlimit=40M"
"--cache-info-age=60m"
"--attr-timeout=1s"
"--dir-cache-time=60m"
"--dir-perms=0777"
"--file-perms=0666"
"--gid=0"
"--max-read-ahead=128k"
"--poll-interval=1m0s"
"--uid=0"
"--umask=000"
"--vfs-cache-max-age=1h0m0s"
"--vfs-cache-max-size=off"
"--vfs-cache-mode=full"
"--vfs-cache-poll-interval=1m0s"
"--vfs-read-chunk-size=128M"
"--vfs-read-chunk-size-limit=off"
]
The command is generated by systemd config, a modified version from the one offered in the wiki. It's adapted to allow access by other users (/etc/fuse.conf change too).
The rclone config contents with secrets removed.
[dospace]
type = s3
provider = DigitalOcean
env_auth = false
access_key_id = ***
secret_access_key = ***
region = fra1
endpoint = fra1.digitaloceanspaces.com
location_constraint = fra1
acl = private
A log from the command with the -vv
flag
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : /: Attr:
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxrwx, err=<nil>
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : /: Lookup: name="test1"
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : /: >Lookup: node=test1, err=<nil>
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test1: Attr:
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test1: >Attr: a=valid=1s ino=0 size=0 mode=-rw-rw-rw-, err=<nil>
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test1: Open: flags=OpenWriteOnly
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test1: Open: flags=O_WRONLY
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test1: >Open: fd=test1 (w), err=<nil>
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test1: >Open: fh=&{test1 (w)}, err=<nil>
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test1: Setattr: a=Setattr [ID=0x104 Node=0x3 Uid=1001 Gid=116 Pid=36617] size=0 handle=INVALID-0x0 lockowner
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test1: Truncating 1 file handles
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test1: >Setattr: err=<nil>
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test1: Attr:
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test1: >Attr: a=valid=1s ino=0 size=0 mode=-rw-rw-rw-, err=<nil>
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : &{test1 (w)}: Flush:
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test1: WriteFileHandle.Flush unwritten handle, writing 0 bytes to avoid race conditions
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : : Added virtual directory entry vAdd: "test1"
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : &{test1 (w)}: >Flush: err=<nil>
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : &{test1 (w)}: Release:
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test1: WriteFileHandle.Release closing
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : S3 bucket peertube-space: File to upload is small (0 bytes), uploading instead of streaming
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test2: Attr:
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test2: >Attr: a=valid=1s ino=0 size=0 mode=-rw-rw-rw-, err=<nil>
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : /: Remove: name="test2"
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test2: Remove:
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : : Added virtual directory entry vDel: "test2"
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test2: >Remove: err=<nil>
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : /: >Remove: err=<nil>
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : /: Attr:
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxrwx, err=<nil>
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : /: Lookup: name="test2"
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : /: Create: name="test2"
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test2: Open: flags=O_WRONLY|O_CREATE|O_EXCL
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : : Added virtual directory entry vAdd: "test2"
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test2: >Open: fd=test2 (w), err=<nil>
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : /: >Create: node=test2, handle=&{test2 (w)}, err=<nil>
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test2: Attr:
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test2: >Attr: a=valid=1s ino=0 size=0 mode=-rw-rw-rw-, err=<nil>
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test2: Attr:
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test2: >Attr: a=valid=1s ino=0 size=0 mode=-rw-rw-rw-, err=<nil>
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test2: Attr:
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test2: >Attr: a=valid=1s ino=0 size=0 mode=-rw-rw-rw-, err=<nil>
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : &{test2 (w)}: Flush:
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test2: WriteFileHandle.Flush unwritten handle, writing 0 bytes to avoid race conditions
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : : Added virtual directory entry vAdd: "test2"
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : &{test2 (w)}: >Flush: err=<nil>
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : &{test2 (w)}: Release:
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test2: WriteFileHandle.Release closing
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : S3 bucket peertube-space: File to upload is small (0 bytes), uploading instead of streaming
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test2: MD5 = d41d8cd98f00b204e9800998ecf8427e OK
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 INFO : test2: Copied (new)
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : : Added virtual directory entry vAdd: "test2"
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : &{test2 (w)}: >Release: err=<nil>
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : test1: MD5 = d41d8cd98f00b204e9800998ecf8427e OK
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 INFO : test1: Copied (new)
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : : Added virtual directory entry vAdd: "test1"
Jan 25 15:55:09 protophont rclone[36072]: 2021/01/25 15:55:09 DEBUG : &{test1 (w)}: >Release: err=<nil>