Answer the question
In order to leave comments, you need to log in
How and how to open/mount a network folder on Ubuntu Server?
Good afternoon, connoisseurs!
With the server version of Ubuntu, I talk to you and work with trembling hands. I faced such a seemingly simple task:
There is server number 1 (Ubuntu Server 14) and server number 2 (Ubuntu Server 16). On server #1 I need to open a folder for network access, let's call it /media/folder1, and on server #2 I need to mount this folder as a network drive, something like /media/server1. How and in what way is it easier and more reliable to do it? As you understand, I need a simple network exchange between folders on servers.
PS If it's important, then the file system on disks with EXT4 files
Thanks in advance for the answers and useful links.
Answer the question
In order to leave comments, you need to log in
Well, if it's easier, then through sshfs.
On server1
apt install openssh
mkdir /media/folder && useradd -d /media/folder mediauser && chown mediauser /media/folder
passwd mediauser
#тут вводим пароль
apt install openssh sshfs
ssh-keygen
#жмем несколько раз ентер
ssh-copy-id [email protected]
# вводим пароль
mkdir /media/server1
sshfs [email protected]:/media/folder /media/server1 #эту строчку будет делать всегда при загрузке сервера2
Option one - samba . In the pros - the ability to climb into this folder not only from linux, but also from windows. Cons - it's still emulation and a non-native protocol for linux.
Option two - nfs . In the pros - the native unix protocol and even for windows there are still clients, in the minuses - the protocol is slightly ancient and not very resistant to hacking.
You can also use webdav, but I don’t advise you with trembling hands , you can mess up there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question