LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Easy FTP Server (https://www.linuxquestions.org/questions/linux-software-2/easy-ftp-server-4175714227/)

Almoc 07-04-2022 11:21 AM

Easy FTP Server
 
hello, is there any program able to start an FTP server automatically and without configuration (like android apps)?
vsftpd is too complicated to set up.

I only need it to transfer files from one pc to another

TB0ne 07-04-2022 11:32 AM

Quote:

Originally Posted by Almoc (Post 6365538)
hello, is there any program able to start an FTP server automatically and without configuration (like android apps)? vsftpd is too complicated to set up. I only need it to transfer files from one pc to another

There are several, and they are only complicated if you want them to be. To set up a basic vsftpd server is fairly easy...it's when you want to do complex things that it can get complicated. One of the many how-to guides:
https://www.servermania.com/kb/artic...al-ftp-server/

And you say you just need to 'transfer files from one pc to another'...which is a bit vague. What kind of PC's (Windows? Mac? Linux?), how often? You already have sftp/scp installed as part of the SSH suite, and there's no need to install/configure anything else. Filezilla can support SFTP and is cross-platform.

pan64 07-04-2022 11:33 AM

no
without configuration the server cannot work. You need to specify access right, directory, logging and probably some other things.
Sometimes you can find some defaults, but those are definitely just some initial/general setup to be able to start to work with that.

michaelk 07-04-2022 11:36 AM

I assume from one PC to another is just on your home network and not a remote connection from the internet.

These are not a FTP server but are a couple of ways to transfer files without any configuration. You do have to open whatever port it runs on if running a firewall.

http://www.home.unix-ag.org/simon/woof.html

https://www.askpython.com/python-mod...hon-httpserver

Turbocapitalist 07-04-2022 12:12 PM

Quote:

Originally Posted by Almoc (Post 6365538)
I only need it to transfer files from one pc to another

FTP is too complicated all the way around for that and it is unfixably unsecurable in general.

In contrast, SFTP is very easy to set up and is actually secure and easy to use. For SFTP, install the package OpenSSH-server from your distro's repository on the one system, perhaps the destination machine. And then from the other system connect using the command sftp or a graphical client like Nautilus, Thunar, PCManFM, or FileZilla.

pan64 07-04-2022 12:17 PM

Quote:

Originally Posted by Turbocapitalist (Post 6365567)
FTP is too complicated all the way around for that and it is unfixably unsecurable in general.

In contrast, SFTP is very easy to set up and is actually secure and easy to use. For SFTP, install the package OpenSSH-server from your distro's repository on the one system, perhaps the destination machine. And then from the other system connect using the command sftp or a graphical client like Nautilus, Thunar, PCManFM, or FileZilla.

Don't forget, we have nfs, cifs and some other possibilities, so I'm not really sure if ftp (or sftp) is the ideal way. Just one way to do that.

teckk 07-04-2022 12:35 PM

Quote:

I only need it to transfer files from one pc to another
Example: Use you own parameters.

Code:

#!/usr/bin/bash

#Get files to transfer
read -p "Enter files to transfer to machine name  :" name

#scp to remote machine, send it files to /remote/dir
scp $name almoc@172.16.0.20:/home/user/dir/

#Keep a log
echo -e "\n"$(date)"\n"$name"" >> scp.log

#Or
#sftp to remote machine, send files
sftp almoc@172.16.0.20:/home/user/dir/ <<< $'put "$name"'

#Get
sftp almoc@172.16.0.22:remotefile.txt localfile.txt

Then you launch the script, paste in the files, hit enter, done.

kermitdafrog8 07-04-2022 04:08 PM

Easy FTP Server
 
Croc is another program to transfer files between pc's.

Https://github.com/schollz/croc

rkelsen 07-04-2022 07:26 PM

Quote:

Originally Posted by Almoc (Post 6365538)
I only need it to transfer files from one pc to another

If you're wanting to do this more than once, using any platform, then it's worth learning how to set up a Samba server.

NFS is even easier but requires additional steps if the client isn't Linux.

rkelsen 07-04-2022 07:41 PM

Quote:

Originally Posted by kermitdafrog8 (Post 6365622)
Croc is another program to transfer files between pc's.

This looks like an interesting concept, but I do have one small question.

Quote:

Originally Posted by https://github.com/schollz/croc
"By default, croc uses a public relay"

Who owns this "public relay?"

It does say that you can make your own relay... but then you've got to set up port forwards & firewalls anyway, so what's the point?

evo2 07-04-2022 07:52 PM

Quote:

Originally Posted by Almoc (Post 6365538)
hello, is there any program able to start an FTP server automatically and without configuration (like android apps)?
vsftpd is too complicated to set up.

I only need it to transfer files from one pc to another

Does it have to be ftp? What about http? Eg

server at 192.168.1.7:
Code:

% echo foo > bar.txt
% python -m http.server
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...

client:
Code:

%  wget http://192.168.1.7:8000/bar.txt
--2022-07-05 09:48:16--  http://192.168.1.7:8000/bar.txt
Connecting to 192.168.1.7:8000... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4 [text/plain]
Saving to: ‘bar.txt’

bar.txt                      100%[===============================================>]      4  --.-KB/s    in 0s     

2022-07-05 09:48:16 (344 KB/s) - ‘bar.txt’ saved [4/4]

Evo2.

rkelsen 07-04-2022 08:12 PM

Quote:

Originally Posted by evo2 (Post 6365647)
Does it have to be ftp? What about http? Eg

server at 192.168.1.7:
Code:

% python -m http.server
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...

client:
Evo2.

It's a neat solution.

As an alternative, you could punch the IP address into your browser at the client end and download any of the files in the directory where you started the server.

We use the python http.server module to serve our phone books to phones on the LAN. It was meant to be a temporary solution until we found something better, but it has been running flawlessly for more than 15 months.

frenchn00b 07-07-2022 04:07 AM

Quote:

Originally Posted by Almoc (Post 6365538)
hello, is there any program able to start an FTP server automatically and without configuration (like android apps)?
vsftpd is too complicated to set up.

I only need it to transfer files from one pc to another

Code:

apt-get install proftpd

/etc/init.d/proftpd start

done !!

Client:

see ncftp
tar xvpfz ncftp-3.2.6-src.tar.gz ; cd ncftp-3.2.6 ; ./configure ; make ; cp bin/ncftp /usr/local/bin/ncftp ; cp bin/ncftpput /usr/local/bin/ncftpput ; cp bin/ncftpget /usr/local/bin/ncftpget

frenchn00b 07-07-2022 04:09 AM

Quote:

Originally Posted by Almoc (Post 6365538)
hello, is there any program able to start an FTP server automatically and without configuration (like android apps)?
vsftpd is too complicated to set up.

I only need it to transfer files from one pc to another

You can just transfert over telnet/nc. It is the easiest way.
see sockets/tel proto.

Almoc 01-12-2023 01:35 PM

Quote:

Originally Posted by evo2 (Post 6365647)
Does it have to be ftp? What about http? Eg

server at 192.168.1.7:
Code:

% echo foo > bar.txt
% python -m http.server
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...

client:
Code:

%  wget http://192.168.1.7:8000/bar.txt
--2022-07-05 09:48:16--  http://192.168.1.7:8000/bar.txt
Connecting to 192.168.1.7:8000... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4 [text/plain]
Saving to: ‘bar.txt’

bar.txt                      100%[===============================================>]      4  --.-KB/s    in 0s     

2022-07-05 09:48:16 (344 KB/s) - ‘bar.txt’ saved [4/4]

Evo2.

thanks, this is good! Can I also share an entire folder? how?

why if i type "https" instead of "http" it doesn't work?


All times are GMT -5. The time now is 09:14 PM.