sftp
sftp copied to clipboard
Specify a default directory upon login
I am loving this image. All is working well. I am using this in a K8s env. I have a pvc that I mount in the pod via:
volumeMounts:
- mountPath: /home/brad/foundrydata
name: foundry-data
Then I pass the following to sftp:
args: ["brad:brad:2000:2000:foundrydata"]
When the user logs in the initial dir is "/" showing a sub dir as "foundrydata".
Is there a way to set the default dir for this user upon login? I would want them in /foundrydata/
Thanks Brad
I had the same problem
You'll need to set up your own Dockerfile
FROM atmoz/sftp:alpine
COPY sshd_config /etc/ssh/sshd_config
add this to the /etc/ssh/sshd_config file:
ForceCommand internal-sftp -d /foundrydata