atmoz / sftp

Securely share your files
https://hub.docker.com/r/atmoz/sftp/
MIT License
1.64k stars 830 forks source link

When a user logs in by sftp, hope user is already in /home/usera/upload and not in /home/usera #343

Open totorofly opened 2 years ago

totorofly commented 2 years ago

I installed the sftp container into k8s

image

The user logged in through sftp -P 22 epay@10.11.14.217

image

I hope user does not see all the folders in the home/usera directory,After the user logs in through sftp,how to let user can only see /home/usera/upload directory?

adrian-amaglio commented 1 year ago

Does the issue #83 answers your question?

mts-dyt commented 12 months ago

It should be fixed by adapting the manifest with the solution provided:

      containers:
      - name: sftp
        image: atmoz/sftp:debian
        command: ["/bin/sh", "-c" , "sed -i -e 's#ForceCommand internal-sftp#ForceCommand internal-sftp -d /upload#' /etc/ssh/sshd_config && /entrypoint"]