0

I would like to know if it's possible to set-up a Linux FTP server to allow anonymous log-in, and also to place that anonymous user in a chroot jail whose root is somehow based on the anonymous log-in credentials.

For example, I would like to be able to tell someone to log-in to my FTP server with the credentials, username anonymous and password xt66ach883a, and for the server to automatically place that anonymous user in a chroot jail whose root is /ftp/xt66ach883a.

Additionally, if the intended chroot jail root folder does not exist, I would like to have it automatically created.

If anyone has achieved a similar set-up before, or could point me in the right direction, I'd be very grateful for your advice.

Castaglia
  • 3,239
  • 3
  • 19
  • 40
snoopy91
  • 243
  • 3
  • 10
  • SFTP != FTP != FTPS -- make up your mind what you need. You can script anything and chroots (for SFTP) are supported in openSSH. – Jakuje Jun 20 '16 at 14:07
  • @Jakuje sorry, I didn't realise they weren't the same thing! Updating my question to relate to plain-old FTP. – snoopy91 Jun 20 '16 at 14:08
  • And in any case having the chrooted user's "FTP home" with the same name as the user's FTP password is a very bad idea in terms of security. – FjodrSo Jun 20 '16 at 16:47
  • @snoopy91 will you have different user names (other than `anonymous`) with different passwords, or _just_ user `anonymous`, with different passwords -- and each different password will have its own home directory? – Castaglia Jun 20 '16 at 16:50

0 Answers0