0

I want make a FTP server. I don't want apache or PHP, just FTP. I tried VSFTPD, ProFTPD, PureFTPD and Samba but they were not work. Lastest I tried the ProFTPD but when i restart the ProFTPD service it says:

Uknown configuration directive at line 8: Include ....

(or like that)

PureFTPD was worked but I could not configure. (Virtual Users, Directories, and Anonymous users etc.)

1 Answer 1

3

I do not understand why VSFTPD, ProFTPD, PureFTPD should not work. They all are available from the default Raspbian repository. You should be able to just install one of them, configure and run it.

But anyway, if you use default Raspbian Stretch then there is no need to install any FTP server. ssh has a sftp server module that is installed by default:

rpi ~$ apt list openssh-sftp-server
Listing... Done
openssh-sftp-server/stable,now 1:7.4p1-10+deb9u4 armhf [installed,automatic]

So if you have ssh enabled you can just use its ftp server module out of the box, for example from any other linux machine:

linux ~$ sftp [email protected]
[email protected]'s password:
Connected to 192.168.50.237.
sftp>

Because sftp is based on ssh you can just create default unix accounts for users, for example:

rpi ~$ sudo adduser myuser

linux ~$ sftp [email protected]

sftp contains the word secure so it is not meant to have an anonymous access. But you can create an account anonymous without password authentication so you have an anonymous login. You should be aware of its security risks and how to avoid them. To make an anonymous account for sftp you can look at Anonymous SFTP on Ubuntu.

To block access to user pi just give him a password that nobody knows.

You can look here to Allow SFTP but disallow SSH.

4
  • So, how can i create users (Like Virtual users) and configure them, or set Anonymous user? Jan 23, 2019 at 4:18
  • @devman2002 I have updated my answer.
    – Ingo
    Jan 23, 2019 at 12:17
  • So, can i block access to user 'pi'? and can I disable SSH connect? Jan 24, 2019 at 10:52
  • @devman2002 I have updated my answer.
    – Ingo
    Jan 24, 2019 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.