What permissions does my user need for SFTP or my SFTP Updates are not working

Basic Permissions

Typically you will need read/write permissions as a pre-requisite. On top of this Strongbox by default now works in "Atomic Write" mode which helps prevent interrupted or terminated network transfers from corrupting your database file.

For this to work you will also need permissions to rename/delete files in the parent directory. Note that the read/write permissions on a particular file do not give you permissions to rename nor delete files. The rename/delete permissions are considered operations with a parent directory, not with the database file. So you will need permissions to modify the parent directory. In short you need r/w on your database file and r/w on the parent directory it is stored in.

What is Atomic Write and how does it work?

Atomic write tries to prevent against an interrupted network connection from truncating or leaving your database file in a half finished and unusable state. It does this by:

1) Uploading your latest changes to a temporary file
2) Renaming your current database file to a different name
3) Renaming the temporary file in step 1 to your database file name
4) Deleting the old version of the database (with the changed name) from step 2

This differs from the older more naive method of just uploading directly to the original file, which if interrupted leaves an unusable database file in place.

What extra permissions do I need for Atomic Write?

You need r/w permissions on the parent directory where you database is stored.

Can I turn Atomic Write Off?

Yes, but we don't recommend it. You can turn Atomic SFTP Write off in Advanced App Settings on iOS and macOS if for some reason you can't give your user the correct permissions, however you are at risk of corrupting your database if an update is interrupted before finishing.

Mar 4, 2024