Context Free Grammar

Context free grammars (CFG) biasa digunakan untuk mendeskripsikan context free language. CFG adalah himpunan dari aturan yang digunakan untuk menghasilkan suatu pola dari string. CFG dapat…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




FTP server with Raspberry PI and HDD

Do you have a portable HDD lying around ? Many people do and since now-a-days we rely a lot on “cloud”, they are seldom used.
Well, if you are like me, you would love to have a home server for a one-time charge of ~$70–80.

What you need ?
- Internet connection
- Access to your router
- HDD with a USB
- Raspberry pi ( worked on 3b) with formatted micro SD card.
- domain name (optional)
- Ethernet cable (optional)
- pi case (optional)

Step 1 : Setup a local SFTP server with Raspberry PI and HDD.

Step 2: Setup internet connection and ssh

If you don’t have ethernet cable, follow step 2.1 else, skip to step 2.2 and connect ethernet cable to your pi.

2.1 Setup wifi connection

Go in SD card. partition named “boot”. This step may vary based on Host OS.

2.2. Setup ssh

create a file “ssh” under “boot” without any extension. This will enable ssh for raspberry pi.
Default username is “pi” and password is “raspberry”.

Now insert SD card inside your pi and plug-in power. Wait for couple of mins.

2.3 Update OS and setup wifi

Look for IP assigned to pi by logging in your router and see connected devices. Generally this portal is available at 192.168.1.1 or 192.168.0.1
ssh pi@<ip address for raspberry pi>
password is “raspberry”

run these commands to update your OS :

If you want remove ethernet cable and connect pi using wifi,
To setup wifi connection, run :

add output to

Add country code as a first line. “country=US”.

Now remove ethernet connection.

change default password by running:

Restart raspberry pi.

Wait for couple of mins and ssh into it again.

Step 5: Mount HDD

Connect your HDD to USB port. It should automatically mount it under /media/pi. We will unmount it from here.

List devices and mount points :

unmount devices if they are listed:

Mount it under / and ensure correct permissions.

Add this mapping to fstab file so that it is preserved even after a reboot,

add this mapping at the end of fstb file :

map this directory to user

Create user for ftp and map the directory we had created above to the user

map this directory to the directory we had created earlier by adding a line in fstp file.

Step 4: Setup SFTP server

This will launch configuration tool. Select “inteface options”

Select “ssh” and enable it.

Use ftp user as : ftpu
IP : IP address of raspberry pi.
Password : Password of ftpu user.

This will allow you to access your Portable HDD from anywhere within your local network (most likely your home).

Step 5: Configure DDNS

Step 6 : PI in case

Add a comment

Related posts:

I Carry Your Story With Me

I do not resist the call of story, to inhale its magic deep into my belly, To clutch it in my grubby hand already full of story, but eager for more. I am not picky about the stories I pick— every…

5 ACT OF KINDNESS

Here are some of the five act of kindness which I did yesterday within 24 hours with people around me and how i experienced after every situation. Leaving outside from home is not easy because we…