Update SetModTime failed: SetModTime failed: sftp: "Permission denied" (SSH_FX_PERMISSION_DENIED)

What is the problem you are having with rclone?

Update SetModTime failed: SetModTime failed: sftp: "Permission denied" (SSH_FX_PERMISSION_DENIED)

These errors are occurring more and more often, including on files that haven't been changed on the source or destination. Same issue with or without --no-update-modtime.

Manually deleting the file/folder(s) and re-syncing resolves the issue but then more issues crop up over time.

These issues from what I recall started occurring when the disk was changed from a 6 to a 10TB drive.
I initially seed the drive locally then connect it to the remote server, it had worked perfectly but I hadn't looked at the logs for the final few syncs before changing the drive so unsure if it is a SFTP server config change (no updates were done since I originally set it up with the first 6TB drive).

I even wiped and re-seeded the 10TB drive locally again to see if I'd messed something up - no change.

Used a few different versions of rclone.

I added the --no-update-modtime flag based on google searches but hasn't made a difference.

What flags should I be using to resolve this, and if I am using the right one, why isn't it working?

What is your rclone version (output from rclone version)

rclone v1.54.0-beta.4968.4f8ee736b

  • os/arch: linux/amd64
  • go version: go1.15.5

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Docker on UnRAID

Which cloud storage system are you using? (eg Google Drive)


The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone sync --config .rclone.conf "/mnt/HD/" HD-R-Encrypted: --delete-before --no-update-modtime --checkers 4 

The rclone config contents with secrets removed.

type = crypt
password = xxx
remote = Remote:/BU/HD

type = sftp
user = X
host = X
key_file = X
key_file_pass = X
key_use_agent = false
port = X
use_insecure_cipher = false
md5sum_command = none
sha1sum_command = none

A log from the command with the -vv flag

2020/12/19 02:48:24 ERROR : Attempt 3/3 failed with 349 errors and: Update SetModTime failed: SetModTime failed: sftp: "Permission denied" (SSH_FX_PERMISSION_DENIED)
2020/12/19 02:48:24 Failed to sync with 349 errors: last error was: Update SetModTime failed: SetModTime failed: sftp: "Permission denied" (SSH_FX_PERMISSION_DENIED)

That flag is for updating mod times rather than re-copying.

You want this guy for the SFTP backend.

https://rclone.org/sftp/#sftp-set-modtime and false.

Great thanks, replaced it with --sftp-set-modtime=false

Can I add that, delete-before and the number of checkers to rclone.conf? Couldn't see if that was possible or not easily!

It's in the advanced option if you edit the remote or you can add in:

set_modtime = false

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.