| Summary: | Make chrooted sftp more user friendly using bind mount (solution suggested) | ||
|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | harvie <harviecz> |
| Component: | sftp-server | Assignee: | Assigned to nobody <unassigned-bugs> |
| Status: | REOPENED --- | ||
| Severity: | enhancement | CC: | bugmenot, djm |
| Priority: | P5 | ||
| Version: | 6.1p1 | ||
| Hardware: | All | ||
| OS: | Linux | ||
|
Description
harvie
2012-11-13 05:09:33 AEDT
There is now an option to specify the starting directory in sftp-server that might help you. E.g. Match group sftpusers ChrootDirectory /chroot/%u ForceCommand internal-sftp -d /%h We have no desire to build bind-mounting into OpenSSH itself though. Otherwise, discussion of your module is better suited to our openssh-unix-dev@mindrot.org mailing list rather than out bug tracker. I'll close this bug and people more knowledgeable about PAM might be able to assist you there. Hi Damien, thanks for answer... It seems reasonable, but i'd like to see at least some more generic way to get the job done. Eg. way to specify some pre-login command: Match group sftpusers PreLoginCommand sh -c 'mkdir /chroot/%u; mount -t bind %h /chroot/%u' ChrootDirectory /chroot/%u ForceCommand internal-sftp -d /%h Well. i can do this using my pam module, however it's bit annoying to build it, install and configure manually on multiple servers, when it can be done simply by altering OpenSSH configuration (if openssh gets patched a little). And i can imagine that there's much more use for such feature... (like mounting home directory for LDAP users, etc...). I personally like OpenSSH because it is very versatile and i think this would make it even more versatile. |