WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: ftp server for picore on raspbery pi model b  (Read 1375 times)

Offline akapetanakhs

  • Newbie
  • *
  • Posts: 5
ftp server for picore on raspbery pi model b
« on: January 12, 2024, 07:30:02 AM »
i dig up an old raspberry pi model b and trying to install ftpd server with no luck, is there a tutorial out there updated to make it work on picore 14.0.1 ?

Offline CentralWare

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 764
Re: ftp server for picore on raspbery pi model b
« Reply #1 on: January 12, 2024, 07:42:09 AM »
TFTP is already in piCore, FTP or sFTP may require compiling
If you are just looking to send or receive a file to/from the Raspberry Pi, see busybox's ftpput and ftpget
If you're looking to turn it into a file server, you may want to consider alternative methods (nfs, for example) or possibly consider TFTP just because it's already built in.
« Last Edit: January 12, 2024, 07:45:54 AM by CentralWare »

Offline akapetanakhs

  • Newbie
  • *
  • Posts: 5
Re: ftp server for picore on raspbery pi model b
« Reply #2 on: January 12, 2024, 07:49:38 AM »
tftp is another protocol to boot images and use for clonezilla ghost etc.

i need an ftpd server so my ipcamera can connect through ftp (that's the only option this ipcam has) and upload videos / images on a mounted usb flas on /mnt/sda1

Offline CentralWare

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 764
Re: ftp server for picore on raspbery pi model b
« Reply #3 on: January 12, 2024, 07:52:45 AM »
TFTP is just a file service (yes, it's popular with pxe boot images)
I had completely forgotten that the older ARMv6 split off ftpd into the extension called inetutils-servers.tcz
Try that out - should lead you where you're looking to go!

Offline akapetanakhs

  • Newbie
  • *
  • Posts: 5
Re: ftp server for picore on raspbery pi model b
« Reply #4 on: January 12, 2024, 07:52:54 AM »
attached txt with the steps i made (for some reason i cannot post this text in here Oo )

basically i made a permanent user login so i can ssh
ressized the partition of the sd
installed inetutils-servers.tcz & nano.tcz
made a script to start ftpd after restart
mounted the sda1
added ftp user/pass
and after i ps | grep ftpd tried to connect ftp localhost with no success.
« Last Edit: January 12, 2024, 08:09:53 AM by haxoridis »

Offline CentralWare

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 764
Re: ftp server for picore on raspbery pi model b
« Reply #5 on: January 12, 2024, 08:08:18 AM »
See these configuration items for inet's ftpd

Remove start_ftpd.sh -- from your text file it looks like you're opening nano which would cause start_ftpd.sh to hang in limbo waiting for you to edit and save bootlocal.sh
Instead, add your launch line directly to bootlocal.sh
Code: [Select]
$(which ftpd) -4 -A -Dthen save it (filetool.sh -b) and reboot.  If it did as expected, you should see it running by entering
Code: [Select]
pidof ftpd which will return a number.
Thereafter, you should be able to connect to it with
Code: [Select]
ftp localhost

Offline akapetanakhs

  • Newbie
  • *
  • Posts: 5
Re: ftp server for picore on raspbery pi model b
« Reply #6 on: January 12, 2024, 08:12:57 AM »
you are a savor my dear friend! <3

Offline CentralWare

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 764
Re: ftp server for picore on raspbery pi model b
« Reply #7 on: January 12, 2024, 08:16:45 AM »
Hardly a savior, but happy to help!

Offline akapetanakhs

  • Newbie
  • *
  • Posts: 5
Re: ftp server for picore on raspbery pi model b
« Reply #8 on: January 12, 2024, 08:19:55 AM »
complete tutorial after a clean install of 14.0.1 picore on a raspberry pi model b,  perma ssh , ftpd through  inetutils-servers.tcz

sudo sh
passwd tc
sudo cp /etc/shadow /opt/shadow

#Add the following to sudo vi /opt/bootsync.sh

sudo mv /etc/shadow /etc/shadow_old
sudo cp /opt/shadow /etc/shadow

#save
filetool.sh -b
sudo reboot

#resize partition

sudo fdisk -u /dev/mmcblk0
p
STARTLBA ######COPY THAT ####NUMBER)
d
2
n
p
2
(PASTE THAT #### )NUMBER#######
enter
w
sudo reboot
sudo resize2fs /dev/mmcblk0p2

df -h   (this will show u that u have mmcblk0p2 extended)

tce-load -wi inetutils-servers.tcz
tce-load -wi nano
filetool.sh -b
sudo reboot
sudo nano /opt/bootlocal.sh

#add this on bootlocal

sudo mount /mnt/sda1
sudo /usr/local/lib/inetutils/ftpd -4 -A -D

#adduser

sudo nano /etc/passwd

#add this on bottom
ftp:x:400:400:Anonymous FTP login:/mnt/sda1:/bin/false

#addgroup FTP
sudo nano /etc/group
#add this on bottom
ftp:x:400:root,ftp

#SAVE
filetool.sh -b
sudo reboot


ftp localhost (user anonymous , password: whatever will work.)
« Last Edit: January 12, 2024, 08:50:08 AM by haxoridis »