Error when using sftp to initialize restic repo


I attempted to test the sftp function with restic, and I get the error below when I run that command :

[root@uat4-2 local]# restic -r sftp:resticuser@ init
resticuser@'s password:
Fatal: create repository at sftp:resticuser@ failed: mkdirAll(/srv/resticbackup/data): unable to create directories: mkdirAll(/srv/resticbackup): unable to create directories: mkdirAll(/srv): unable to create directories: <nil>, sftp: "Permission denied" (SSH_FX_PERMISSION_DENIED), file does not exist, file does not exist

Why do I get this error, and what do I do to fix it?

Have you verified that the user that logs on via sftp can actually create dirs and files in the directory that you specified?
The error message mkdirAll(/srv/resticbackup) can give you a hint.
So the users must be able to create a folder inside /srv/ and not just inside /srv/resticbackup/.