Unable to Write Modification Times over SFTP after Ubuntu Upgrade

Get help for specific problems
Posts: 2
Joined: 28 Feb 2025

dbqandersons

Hi Everyone,

Long time listener, first time caller.

I recently upgraded my target server from Ubuntu 22.04 to Ubuntu 24.04. Since that upgrade, Free File Sync is no longer able to write modification times on the target server via an SFTP connection, throwing the error SSH_FX_PERMISSION_DENIED [libssh2_sftp_setstat] (see failed transfer log near the end of this post).

The Ubuntu upgrade is the only change that has been made on either the source or the target since the last time I successfully uploaded using these same settings on 12 Feb 2025 (see successful transfer log at the end of this post). Other versions are the same. Although I have now upgraded Free File Sync to version 14.2 during my troubleshooting efforts.

The issue happens whether I am using File Safe File Copy or not. The filesystem on the target server is a "normal" ext4 file system (not an NFS mount). The settings I am using for this target also have not changed. The only change I can think of is the Ubuntu upgrade. I'm guessing something went wonky with the sshd settings? Maybe?

I'm going to keep digging and messing with my target sshd settings, but if anyone can help shed any light, I'd greatly appreciate it.

Cheers,

Bill


FAILING ATTEMPT ON 28 FEB 2025
[10:01:37 AM]  Info:  Comparison finished: 454 items found – Time elapsed: 00:00:07
[10:02:07 AM]  Info:  Using non-default global settings:
                          Fail-safe file copy: Disabled
[10:02:08 AM]  Info:  Synchronizing folder pair: Mirror ->
                          D:\pictures\2025
                          sftp://anderson@upload.rootbeertag.com:2222/photos/2025
[10:02:08 AM]  Info:  Updating file "sftp://anderson@upload.rootbeertag.com:2222/photos/2025/02-13-25 Kitties/01 C-A-T.jpg"
[10:02:08 AM]  Warning:  Cannot write modification time of "sftp://anderson@upload.rootbeertag.com:2222/photos/2025/02-13-25 Kitties/01 C-A-T.jpg".
                         SSH_FX_PERMISSION_DENIED [libssh2_sftp_setstat]
[10:02:08 AM]  Info:  Updating file "sftp://anderson@upload.rootbeertag.com:2222/photos/2025/02-13-25 Kitties/02 Smores.jpg"
[10:02:09 AM]  Warning:  Cannot write modification time of "sftp://anderson@upload.rootbeertag.com:2222/photos/2025/02-13-25 Kitties/02 Smores.jpg".
                         SSH_FX_PERMISSION_DENIED [libssh2_sftp_setstat]
SUCCESSFUL RUN ON 12 FEB 2025
8:21:40 AM    Info:    Comparison finished: 353 items found – Time elapsed: 00:00:05
8:21:44 AM    Info:    Using non-default global settings:
    Fail-safe file copy: Disabled
8:21:45 AM    Info:    Synchronizing folder pair: Mirror ->
    D:\pictures\2025
    sftp://anderson@upload.rootbeertag.com:2222/photos/2025
8:21:45 AM    Info:    Creating folder "sftp://anderson@upload.rootbeertag.com:2222/photos/2025/02-11-25 Smores"
8:21:50 AM    Info:    Creating file "sftp://anderson@upload.rootbeertag.com:2222/photos/2025/02-11-25 Smores/01 Smores.jpg"
8:21:51 AM    Info:    Creating file "sftp://anderson@upload.rootbeertag.com:2222/photos/2025/02-11-25 Smores/02 Smores.jpg"
Posts: 2
Joined: 28 Feb 2025

dbqandersons

Nevermind.

I forgot that I had monkeyed with my target server to change the chroot directory for that user. Once I changed it back to what it should be, things started working.

I'll see myself out :)

Thanks,

Bill