When pushing to the sftp server as a user to subdirectories, they are not allowed to push anything by default.
Although sftp-server-pods have a long lifetime, they sometimes need to be manually "prepared" - making them non-stateless - like so:
/ # mkdir home/<user>/<subdirectory1>
/ # mkdir home/<user>/<subdirectory1>/<subdirectory2>
...
/ # chown -R roamcontrol:100 home/<user>/<subdirectory1>/
I suggest a mechanism that sets up the FS through containerscripting like above. The chart currently carries a KV sftpConfig.username so how about a range for sftpConfig.userdirectories?
e.g.:
sftpConfig:
username: sftp
userdirectories:
- subdirectory1/subdirectory2
- subdirectory3