"FTP" to Raspbmc's USB HDD
#1
Hello,

Just started with a Raspberry Pi and loaded Raspbmc. Pretty straight forward and easy. I hooked up a 1TB external USB drive to the device and have movies, music and pictures and all work fine. I have looekd around this forum and other sites, but can't seem to find an answer to a feature I'd like to implement on this device. I would like to connect from a remote site to my Raspberry Pi's HDD to be able to transfer files to it. Just like an FTP service would be. I understand that Raspxbmc does not have this kind of service? Is there another way or a solution to this? Hopefully an add-on is available, but I haven't seen it yet.

Many thanks for any pointers.
Reply
#2
RaspBMC has a number of services available - ftp and SSH amongst them.
The real trick is to organise things so you can access these facilities from a remote (or is that really external) site - for which you'll need to think about dynamic dns and what sort of firewalling to have in-place.
I seem to remember seeing a thread within the last week about doing this sort of access - have a hunt for it, as then you may get practical notes instead of just my guesses (I did post something in that thread)
Derek
Reply
#3
Many thanks for your reply...

I checked your profile and threads but I haven't been able to see anything that relates to my issue? I've also tried to search the forums using "FTP" and "SSH" and it won't let me since it needs a minimum of 4 letters to do the search.

Would you mind pointing out the thread you mention so I can check it out?

No problem in messing around with firewall and dyndns as long as it's possible to access this external HDD.

Many thanks!
Reply
#4
As long as you can FTP or ssh from your local network (which you should be able to) then doing the same from a remote site is purely a router/port forwarding issue.
You might want to read up some info from here:
http://portforward.com/english/routers/p...rindex.htm

(I think raspbmc enables a firewall by default - disable that before trying to get this working).
Reply
#5
Jukala,
sorry about the lack of link - the thread is elsewhere, but the only (slightly) relevant bits were about port forwarding.
Derek
Reply
#6
Again, thanks for your replies.

I've managed to get the FTP working inside my home network. The issue I'm having is with my router - it won't allow me to forward ports 21-23 since they are used by the service provider for upgrades and maintenance. I called the company and they said that there shouldn't be an issue with using another port. Now, I can't seem to find in Raspxbmc any way to change the default port of 21. I found out how to ssh and still have to try this bit but I'm wondering if I can change the default port? I believe there's a file that needs to be amended using this: "sudo leafpad /etc/vsftp.conf".

Can you advise if I'm going in the right direction?

Many thanks
Reply
#7
Have not tried this myself but this should do it.

There are many ways to do all this, easiest is to use SFTP but then you need to enable the root account, so let´s do something else.
Do the following from a SSH terminal:

Make a backup:
Code:
sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.bak

To edit vsftpd.conf:
Code:
sudo nano /etc/vsftpd.conf

Browse to the last line and add the following (on it´s own line):
Code:
listen_port=xxxx
Where xxxx is the port you want to change to.

To exit press ctrl + x (^x)
When asked if you want to save press y
When asked file name press Enter

Reboot and try it out.

To change back, either delete the added line or use the backup.
Reply
#8
Exposing ftp to the internet at large is just stupid. Dont do it.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#9
I managed to get it working with following your suggestions and adding the following code I found in a Linux forum:

connect_from_port_20=NO
ftp_data_port=8020
listen_port=8021

So all is good now.

I appreciate the concern about opening ports nickr, but the benefit, for me, to have this functionality against the possibility to have someone hack my system is high. I really don't have anything but this Raspberry Pi and HDD on the network with nothing critical so no big deal if someone decides to cause any harm here.

Many thanks to all.
Reply

Logout Mark Read Team Forum Stats Members Help
"FTP" to Raspbmc's USB HDD0