Forum
How to connect to a Pi /w Xbian using FTP? - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Configuration (/forum-17.html)
+--- Thread: How to connect to a Pi /w Xbian using FTP? (/thread-891.html)

Pages: 1 2


How to connect to a Pi /w Xbian using FTP? - Steffko - 12th May, 2013 04:10 AM

Hi there. I'm sort of new to the Raspberry Pi, installed Xbian and now I tried to get a connected (via FTP or however) to my Pi to copy stuff from my PC to either the SD card or a connected USB stick. I know I can stream the content (and that's working just fine), but I'd like to have it on the device.
I hope you can help me out a bit. I'm just some random Windows user, so please be patient Big Grin


RE: How to connect to a Pi /w Xbian using FTP? - Trinket - 12th May, 2013 05:55 AM

You mean to transfer it inside your local network right? And you have your Raspberry Pi connected to it either via ethernet cable or Wifi dongle?
If that's so, all you need to configure now is Samba sharing. Samba takes care of sharing files inside your network.
You must add the folders you wish to share with the PC to the samba config file which is located in /etc/samba/smb.conf
Terminal
xbian@Raspberry ~ $ cd /etc/samba
xbian@Raspberry /etc/samba $ sudo nano smb.conf
You should now see the config file, assure the following options are set up correctly:
PHP Code:
workgroup WORKGROUP 
interfaces 
127.0.0.0/8 eth0
bind interfaces only 
true
security 
share
guest account 
nobody 
Make sure "WORKGROUP" is the same as your windows workgroup, the interfaces option sets which type of connection it allows, if you use a ethernet cable it should be fine with that, you can also restrict it to your local ip by adding "192.168.1." where that should be your default gateway (without fixing the last numbers).
The security is set so as anyone with access to the local network can access it, if you wish I can show you how to require a user and password to access the share.
To add a folder to the share append the following to the end of the file:
PHP Code:
[Guest Share]
        
comment Guest access share
        path 
= /path/to/dir/to/share
        browseable 
yes
        read only 
yes
        guest ok 
yes 

Once done you must restart the samba server on the raspberry pi with the following command:
Terminal
sudo service samba restart
Hope it helps!


RE: How to connect to a Pi /w Xbian using FTP? - rikardo1979 - 12th May, 2013 05:58 AM

&enable SMB in XBian config (SSH or in XBMC) Wink


RE: How to connect to a Pi /w Xbian using FTP? - Steffko - 12th May, 2013 06:20 AM

Yeah, that's exactly what I'm trying to do (own LAN, Pi connected to it via ethernet cable).

Now... I'm confused ^^

Where exactly do I find "/etc/samba/smb.conf"? I'm not even sure if this is supposed to be on the PC or on the Pi (I guess the Pi/Xbian).

I guess there is some kind of terminal in Xbian, but I'm not sure where/how to activate/find it.

And yepp, I'd like to set this up so that connecting to the Pi requires username/password.

So it'd be great if you could explain these two steps to me a bit more Smile


RE: How to connect to a Pi /w Xbian using FTP? - rikardo1979 - 12th May, 2013 06:32 AM

http://xbian.org/getting-started/configuring-xbian/

http://xbian.org/getting-started/install-and-connect/#ssh


RE: How to connect to a Pi /w Xbian using FTP? - Jhinta - 12th May, 2013 06:32 AM

(12th May, 2013 06:20 AM)Steffko Wrote:  Yeah, that's exactly what I'm trying to do (own LAN, Pi connected to it via ethernet cable).

Now... I'm confused ^^

Where exactly do I find "/etc/samba/smb.conf"? I'm not even sure if this is supposed to be on the PC or on the Pi (I guess the Pi/Xbian).

I guess there is some kind of terminal in Xbian, but I'm not sure where/how to activate/find it.

And yepp, I'd like to set this up so that connecting to the Pi requires username/password.

So it'd be great if you could explain these two steps to me a bit more Smile

you can connect to terminal with putty but you have to enable it (ssh) this will give you ssh-config

but its te same as the gui in xbmc in settings (but ssh gives you more low level acces )
also http://www.samba.org/samba/docs/man/manpages-3/smbpasswd.8.html
also (/etc/samba/smb.conf) is for where the servies is running so that will be the pi as you want samba on your pi


RE: How to connect to a Pi /w Xbian using FTP? - rikardo1979 - 12th May, 2013 06:37 AM

i think that you should start from helpful links on our page Wink all is there


RE: How to connect to a Pi /w Xbian using FTP? - Trinket - 12th May, 2013 06:42 AM

You must type it on the Pi, on the command line, you can do it by leaving xbmc (Shutdown icon-->Exit) or you could set up an ssh connection (worth the time as it's really convenient), with it you will be able to control your raspberry pi from within your PC via command line (That's where you should write what I explained you).
To connect to your raspberry pi via ssh you must download a ssh client for windows that's called putty from here, execute it and place the Raspberry pi ip address inside host name field, you can find the ip in xbmc, system-->system information or within your local router localweb then make sure the option "SSH" is checked and click the Open button.

Once you've done it I will explain further on the security.


RE: How to connect to a Pi /w Xbian using FTP? - rikardo1979 - 12th May, 2013 06:45 AM

(12th May, 2013 06:32 AM)rikardo1979 Wrote:  http://xbian.org/getting-started/configuring-xbian/

http://xbian.org/getting-started/install-and-connect/#ssh
all is here people...so why do something what is already done? Wink
Cool


RE: How to connect to a Pi /w Xbian using FTP? - Trinket - 12th May, 2013 06:59 AM

(12th May, 2013 06:45 AM)rikardo1979 Wrote:  
(12th May, 2013 06:32 AM)rikardo1979 Wrote:  http://xbian.org/getting-started/configuring-xbian/

http://xbian.org/getting-started/install-and-connect/#ssh
all is here people...so why do something what is already done? Wink
Cool
True, and explained a lot better!Undecided
Next time will check if it's already explained elsewhere first Big Grin


RE: How to connect to a Pi /w Xbian using FTP? - rikardo1979 - 12th May, 2013 07:02 AM

(12th May, 2013 06:59 AM)Trinket Wrote:  
(12th May, 2013 06:45 AM)rikardo1979 Wrote:  
(12th May, 2013 06:32 AM)rikardo1979 Wrote:  http://xbian.org/getting-started/configuring-xbian/

http://xbian.org/getting-started/install-and-connect/#ssh
all is here people...so why do something what is already done? Wink
Cool
True, and explained a lot better!Undecided
Next time will check if it's already explained elsewhere first Big Grin
not a big deal, but I just wanted to point out that if anyone looking for help or answer than should always start by searching an researching Wink
btw, its even in our rules Wink


RE: How to connect to a Pi /w Xbian using FTP? - Kevf - 19th May, 2013 07:07 PM

Another question than. I've used the instructions on the links and this is the output of the file

Code:
[global]
        workgroup = WORKGROUP
        usershare allow guests = yes
        security=share
        follow symlinks = yes
        wide links = yes
        unix extensions = no
        lock directory = /var/cache/samba

        [xbian]
        browsable = yes
        read only = no
        guest ok = yes
        path = /home/xbian
        force user = xbian

        [devices]
        browsable = yes
        read only = no

How can I add the Pi as a network drive? I tried different thing when mapping a drive

\\192.168.*.***\xbian\home

should be it as far as I know...

(I have to exit nano with ^X, what does that mean? Feels like a stupid question.....)


RE: How to connect to a Pi /w Xbian using FTP? - rikardo1979 - 19th May, 2013 07:16 PM

did you install SAMBA package from xbian-config ?
under Sytsem>Settings or from SSH


RE: How to connect to a Pi /w Xbian using FTP? - Kevf - 19th May, 2013 07:26 PM

(19th May, 2013 07:16 PM)rikardo1979 Wrote:  did you install SAMBA package from xbian-config ?
under Sytsem>Settings or from SSH

ssh: config ==> packages
5 [Samba] [Yes]

That should be it right?


RE: How to connect to a Pi /w Xbian using FTP? - rikardo1979 - 19th May, 2013 07:31 PM

(19th May, 2013 07:07 PM)Kevf Wrote:  (I have to exit nano with ^X, what does that mean? Feels like a stupid question.....)
CTRL+x