petepots
Posts: 64
Joined: Mon Sep 08, 2014 9:19 am
Location: Surrey, UK

Is there an error here Installing FTP

Tue Apr 28, 2015 1:41 pm

Guys

I just cannot under this:

https://raspguide.wordpress.com/2014/03 ... pd-part-1/

Where you have
sudo openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout /etc/vsftpd/vsftpd.pem -out /etc/vsftpd/vsftpd.pem

How does /etc/vsftpd/vsftpd.pem get created, because what I get is this:

pi@raspberrypi ~ $ sudo openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout /etc/vsftpd/vsftpd.pem -out /etc/vsftpd/vsftpd.pem
Generating a 1024 bit RSA private key
......++++++
.......................................................++++++
writing new private key to '/etc/vsftpd/vsftpd.pem'
/etc/vsftpd/vsftpd.pem: No such file or directory
3069232336:error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('/etc/vsftpd/vsftpd.pem','w')
3069232336:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:
pi@raspberrypi ~ $ ^C
pi@raspberrypi ~ $

can anyone work out why I am getting this
Kind regards Peter

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: Is there an error here Installing FTP

Tue Apr 28, 2015 3:19 pm

Why not just use ssh which which is effectively the same thing and installed out of the box ?
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

petepots
Posts: 64
Joined: Mon Sep 08, 2014 9:19 am
Location: Surrey, UK

Re: Is there an error here Installing FTP

Tue Apr 28, 2015 3:35 pm

Not sure how to configure SSH over the web, that's why I am trying to get FTP to work

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: Is there an error here Installing FTP

Tue Apr 28, 2015 4:27 pm

What exactly are you trying to achieve ? Theres a lot more expertise out there with the very common ssh over an obscure 'vsftp' . It isn't difficult to set up secure file transfer with ssh over the web, and I thought you'd have pretty much the same hoops to jump with vsftp to get that working over the web.

Plain old FTP is a different kettle of fish, but that is hideously insecure.
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

cpc464
Posts: 239
Joined: Tue Jul 08, 2014 5:10 pm
Contact: Website

Re: Is there an error here Installing FTP

Tue Apr 28, 2015 4:49 pm

Hi Petepots. Like others, I would recommend using ssh, which is a secure SFTP server and is probably running on your Pi already. It's a no brainer.

However, I don't know the cause of your error. Does the directory /etc/vsftp exist ?
Unix engineer since 1989

petepots
Posts: 64
Joined: Mon Sep 08, 2014 9:19 am
Location: Surrey, UK

Re: Is there an error here Installing FTP

Tue Apr 28, 2015 8:57 pm

Your question:
Does the directory /etc/vsftp exist ?
No thats the problem I think, I cant work out whats going wrong with these instructions

I think it fails running these below
sudo apt-get install openssl
sudo apt-get install update
sudo apt-get install upgrade

User avatar
Can-Toi
Posts: 68
Joined: Sat Mar 28, 2015 12:41 pm
Contact: Website

Re: Is there an error here Installing FTP

Tue Apr 28, 2015 10:23 pm

Why do you want to use vsftp over SSH?

Configuring to use SSH "over the web" should not be that different than configuring svftp for use "over the web". In fact, if you count installing the base system, SSH is much easier as it's installed by default, as others have mentioned. I think you might run into the same problems with getting vsftp to run "over the web" as you have with getting SSH to work. (Basically, for both systems, you have to configure port forwarding to your pi and know your external IP).

What's not working for you with SSH?
"The mind is the effect, not the cause"
- Daniel Dennett

cpc464
Posts: 239
Joined: Tue Jul 08, 2014 5:10 pm
Contact: Website

Re: Is there an error here Installing FTP

Wed Apr 29, 2015 1:07 pm

I think the OP has now got the message that people recommend SSH rather than vsftp.

Well since /etc/vsftp does not exist, it would seem that vsftp is likely not installed. I haven't used the procedure you are following, but I would find the bit about installing vsftp and do it again.
Unix engineer since 1989

petepots
Posts: 64
Joined: Mon Sep 08, 2014 9:19 am
Location: Surrey, UK

Re: Is there an error here Installing FTP

Wed Apr 29, 2015 1:25 pm

Thanks guys for your help

I have solved the problem, I needed to open port 80. As I understand I cannot use SSH because I wanted to transfer files etc.

As I said I got the vsftpd by installing it on the Pi, changing come configuration and all working fine now.
:D

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: Is there an error here Installing FTP

Wed Apr 29, 2015 1:40 pm

You can easily use ssh to transfer files, I do it all the time.
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

cpc464
Posts: 239
Joined: Tue Jul 08, 2014 5:10 pm
Contact: Website

Re: Is there an error here Installing FTP

Wed Apr 29, 2015 1:41 pm

That's cool.

A bit about SSH. SSH is both a login shell service and an sFTP file transfer service rolled into one. If a server is runningSSH, you can also sFTP into it with any client like putty, command line sftp, scp, Filezilla or others. If you are able to SSH into your Pi, then you can also sFTP to it, by default.
Unix engineer since 1989

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Is there an error here Installing FTP

Wed Apr 29, 2015 1:44 pm

petepots wrote: I have solved the problem, I needed to open port 80. As I understand I cannot use SSH because I wanted to transfer files etc.
Open port 22 and you can use sftp which is part of sshd.

Beware port 22 just like port 80 attracted lots of unwanted visitors. In twelve hours from the reboot of my B+ last night I'd already turned away 54 attempts to break in.

There may be some value in having a non-standard port (2222?) forwarded to 22 if your router allows that.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

petepots
Posts: 64
Joined: Mon Sep 08, 2014 9:19 am
Location: Surrey, UK

Re: Is there an error here Installing FTP

Wed Apr 29, 2015 7:54 pm

Thanks Dougie

I can see where I went wrong with setting up vsftpd, but you guys keep saying about ssh but I dont understand.

I have the ftp working on port 21using vsftpd, I have no idea how secure that is and I have no idea how to set up this ssh way, I cant just change the port number there must be more to it.

I guess I will have to keep digging

Thanks Guys

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Is there an error here Installing FTP

Wed Apr 29, 2015 9:47 pm

FTP is the least secure protocol of all (apart from tftp). It sends userids & passwords in clear (there's no option to encrypt that stuff). It sends your data in clear. It's a vector for every cracker. It's been seen in some very high profile security breaches (including the Scandinavian bank that had their mainframe hacked).

sftp (secure ftp) is part of ssh/sshd and it's well supported by clients like PuTTY, MobaXterm, WinSCP and Filezilla.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

petepots
Posts: 64
Joined: Mon Sep 08, 2014 9:19 am
Location: Surrey, UK

Re: Is there an error here Installing FTP

Thu Apr 30, 2015 1:20 pm

Dougie

Got it working on sftp and also a much higher port no as you suggested.

Thank you again, much appreciated

Peter

:D

Return to “Troubleshooting”