can I set up
- a secure ftp for somebody (not a current user on the system)
- for 2 different directories on Ubuntu
- inside public_html?
I don't want to give the user pure ssh account right now.
Any other upload,download,delete file secure way is good too. nginx is available not apache2.
try using
scponly
Edit:
Example set-up:
1) create account for using
scponly
:2) change default shell for the account:
answer with
/usr/bin/scponly
, (make sure that/usr/bin/scponly
is in/etc/shells
)3) you can modify joe's home directory to
/my/web/site/dir
in/etc/passwd
4) modify permissions:
5) If you are using
AllowUsers
directive in/etc/ssh/sshd_config
add joe to the list of users that can log in.6) restart ssh:
7) test from another host:
I beleive that you could use rssh to setup a restricted shell to provide access over sftp but not over say ssh. I also beleive that you could "lock" the user to specific folders by using chroot. Here are two links that explains this further:
How to: Restrict Users to SCP and SFTP and Block SSH Shell Access with rssh
Linux Configure rssh Chroot Jail To Lock Users To Their Home Directories Only
Please note that I have actually never done this myself.
Edit: As Zoredache points out it may be a better solution to do the chrooting in the sshd config direcly, instead of doing this in the rssh config as the above link suggests.
Make one home directory for new user then symlink other two dir. in that home dir & give that two folder appropriate permission.
finally I use Limiting Access with SFTP Jails on Debian and Ubuntu
at the end I used pure-FTPd with TLS support