Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

File Server on my LAN

Here you can discuss every aspect of Debian. Note: not for support requests!
Post Reply
Message
Author
coppolino97
Posts: 116
Joined: 2018-06-05 15:23
Location: Italy
Has thanked: 2 times

File Server on my LAN

#1 Post by coppolino97 »

Hi guys,
I have a computer and I want use it as home server.
On this home server I would create a file server.
Samba or FTP? :?

My main question is:
what do you suggest about file server?
I would install a solution that permit me to create a "central point" in my LAN to share and save file.
I would that device in my LAN can easy share file using it and I would reach them remotely, maybe even without a VPN.
In my opinion FTP could be the right solution, what do you sugget about it?
I have different devices with different operating system.

Thanks so much! :D
Lenovo T460 | 8Gbyte of RAM | Intel core i5 | SSD 250GB | Debian 12

andre@home
Posts: 398
Joined: 2011-10-02 08:00

Re: File Server on my LAN

#2 Post by andre@home »

When you want to reach the fileserver from outside without a VPN using a FTP is not very safe.

There are several options, so far (since 2011) I use Webdav with https/ port 443.
Under MacOS you can easily mount the server disk as a local drive.
Linux too.
For Windows the easiest option is the last free version of Netdrive (V1.3).

In the router you need to port forward port 443 to your webdav server to be able to reach it from outside.
There are many configurations examples around.
But just find some reading on webdav.

What Debian version do you use?

For Debian 9:
https://www.hiroom2.com/2017/06/23/debi ... ll-webdav/

coppolino97
Posts: 116
Joined: 2018-06-05 15:23
Location: Italy
Has thanked: 2 times

Re: File Server on my LAN

#3 Post by coppolino97 »

Hi @andre@home,
I have Debian 9 on this computer.
Thanks for your suggestion!

What do you think about FTPS?

Best regards
Lenovo T460 | 8Gbyte of RAM | Intel core i5 | SSD 250GB | Debian 12

andre@home
Posts: 398
Joined: 2011-10-02 08:00

Re: File Server on my LAN

#4 Post by andre@home »

Only SFTP is the safest FTP-protocol.
FTPS does not have imho the end-to-end encryption, imho I would never use it.

https://www.ssh.com/ssh/sftp/
SFTP support this list of operation see link. So not all.

Using WebDAV you get in principle all the operations you have using the file manager, the one you prefer.
I like that very much as I can do all the operation I'm used to.
Never got a problem since I'm using it since 2011... so 9 years without complications.

I was inspired in those days by a Frenchman:
http://www.bernaerts-nicolas.fr/linux/7 ... bdav-share
This one is outdated now.

I'm now busy with upgrading our server to Debian 9 or 10 or a Debian-based light version like and Bunsenlabs seems very interesting, and I can use the configuration files of Debian 9/10 directly.
I'm in the test phase in a Virtual Machine. I will publish my final experiences incl the configurations on the relevant site (here or Bunsenlabs) asap.
It has become even simpler to install webdav that my version based on the French one.

Setup up the VM and webdav takes me less than half an hour....
When I'm ready with my comparison of light distros (Debian based), I will choose the best one and install it on my 2 real servers.

If you're interested in this WebDAV setup, please wait a short time... or of course find out your self or use SFTP..

arzgi
Posts: 1194
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: File Server on my LAN

#5 Post by arzgi »

I was going to suggest curlftpfs or like, but the requirement to serve different OS's changes the game.

Have no experience of WebDav. FTP is very poor choice, as andre@home told, it sends passwords as readable text.

Samba, which I also have not used could be one solution, it's been around, so plenty of info available. Also some samba threads here at the forum.

Web based solutions as WebDav might be simpler to setup.

andre@home
Posts: 398
Joined: 2011-10-02 08:00

Re: File Server on my LAN

#6 Post by andre@home »

Samba has some issues as Samba V1 is depreciated in e.g. Windows 10.
FTP sends the password unprotected, so a no go area.
SFTP : if you like it , its OK. There are clients for all platforms I guess.
WebDAV is as what I described. I only use it with Apache webserver, but should be possible with others. There are clients for all platforms or you can just mount it.... and use your favorite file manager... 8)

coppolino97
Posts: 116
Joined: 2018-06-05 15:23
Location: Italy
Has thanked: 2 times

Re: File Server on my LAN

#7 Post by coppolino97 »

Hi,
Thanks for you replies.
I have never evaluated WebDav, after some research it is interesting!
SFTP is a good option too due to is based on SSH.
After that, if I am right, WebDav and SFTP need just one TCP port on firewall configuration.

Finally, I would that smartphone can use this file server. My smartphone is Android based.
Is WebDav more easy to use than FTP to share files on smartphone?

Thanks :)
Lenovo T460 | 8Gbyte of RAM | Intel core i5 | SSD 250GB | Debian 12

andre@home
Posts: 398
Joined: 2011-10-02 08:00

Re: File Server on my LAN

#8 Post by andre@home »

Yes, most servers need port forwarding in the router and open port 443 (1x TCP), to be accessed thru the HTTPS protocol.
And if your server has an own firewall you need to open that port too via iptables or nftables.

Both on my Iphone 5S and my Samsung TAB A1 0.1 (Android) I use Webdav Nav lite.
https://play.google.com/store/apps/deta ... lite&hl=en

As a lot of my sons data for work are there, I have installed a VPN at home last year, just for some extra safety.
That VPN I also use for Wi-Fi on public places. This was one of the the main reason, so I do not have to bay a commercial VPN membership.
The building of it was very nice, on a Raspberry Pi (RPI).
With Pi-Hole it also adds add-blocking for all our systems, another main goal.

https://www.zwiebelfam.nl/en/raspberry-pi-3/
https://www.zwiebelfam.nl/vpn-verbinding/?lang=en
It works now for 1.5 year without problems.

The RPi is just an extra, not necessary for WebDAV it self as we never had any problems with it.

I never tried SFTP, so I cannot share experiences on that.

Good luck with making up your decisions.

coppolino97
Posts: 116
Joined: 2018-06-05 15:23
Location: Italy
Has thanked: 2 times

Re: File Server on my LAN

#9 Post by coppolino97 »

Hi andre@home,
thanks so much for your help!

Best regards
Federico
Lenovo T460 | 8Gbyte of RAM | Intel core i5 | SSD 250GB | Debian 12

User avatar
Zoot
df -h | grep > 90TiB
df -h | grep > 90TiB
Posts: 163
Joined: 2010-01-12 15:27
Location: Ireland
Has thanked: 5 times
Been thanked: 3 times

Re: File Server on my LAN

#10 Post by Zoot »

The best option is not to open up ports to the outside world if you can, or just open up the bare minimum.

My home server (which is powered by Buster) has a Samba server that shares my media library out over my home LAN. It also runs an OpenVPN Access server installed in a Stretch Virtual Machine that runs via KVM/Libvirt.

If I want to access it from outside the house, I can just connect to the OpenVPN server and then I can access it as normal. All of the traffic is encrypted and it saves me having to open up lots of ports to the outside world, all that's required is UDP on Port 1194. An even better option is to get a router that can host an OpenVPN server itself, but that option isn't available to me.

There is a version of OpenVPN in the Debian repos, but I went with the Access server (there's an official repo for Buster & Stretch on the OpenVPN website) since it has a nice Newbie-friendly WebGUI to manage everything.

andre@home
Posts: 398
Joined: 2011-10-02 08:00

Re: File Server on my LAN

#11 Post by andre@home »

When I'm on a trusted network I mostly take webdav directly else I can use OpenVPN too.
The advantage of having at least also webdav, I can under problem conditions download files via the browser (https) as the last way to get to the data.
I would never expose SMB to the WWW..... it cannot do https over 443.
Only this:
https://www.varonis.com/blog/smb-port/
So your VPN is a good choice to use SMB.

Post Reply