How do I share files between 2 solydk computers

Questions about networking.
In the Original Post please also include the output of inxi -FNzxx
Fargo
Posts: 896
Joined: 17 Sep 2013 14:40

How do I share files between 2 solydk computers

Postby Fargo » 11 Nov 2016 21:32

I've been banging my head against the wall for 2 hours trying to get my 2 solydk computers to talk to each other. But I just can't make it work. Networking is always the one area that Linux seems to fail me. So now I come to you. How do I share files back and forth between 2 SolydK computers hardwired to the network?

SolydForEver
Posts: 339
Joined: 13 Oct 2014 05:25
Location: East part of The Netherlands

Re: How do I share files between 2 solydk computers

Postby SolydForEver » 11 Nov 2016 22:16

Is your head still okay, or do you need a doctor?

Sharing files over the network can be done in different ways.
When both computers are constantly on, you could add a line in your fstab mounting a drive in the other computer to this one, and vice versa.
Problem is, when one is switched off, the mount is still there but the connection is gone and the system could/will freeze.

I use autofs. It's a small program which runs as a service in the background. By means of 2 configuration files you setup the connection which will be only be there when you need it, and after a certain time (time-out parameter) the temporary mount is gone. Now when the other computer is witched off, your system will not hang cause there is no mount active.
Install autofs from the repository and dive into the folder /etc. In there you will find a file called auto.master and some others. I would not use the others but make a new one yourself.
In auto.master you write the base folder for all shares, the name of the share file and the setting for the time-out, like this:

Code: Select all

/Data/Shares /etc/auto.shares --timeout=10 --ghost
+auto.master

These are the three last lines in your auto.master file. One thing, make sure there is an empty line after +auto.master line, or it will not work.
/Data/Shares is the base folder I use for all my shares, you can choose everything, but make sure you choose something where you as user have writing permissions, like for example your home directory.
/etc/auto.shares is the second config file I use with details about the share(s)
--time-out-10 means 10 seconds after the connection has been used last the connection is cut-off
--ghost makes sure there will not be any shares still mentioned in your base share folder which no longer are present.

In my /etc/auto.shares folder I have this:

Code: Select all

NAS	   -fstype=cifs,rw,credentials=/.credentials ://192.168.2.227/public/
NAS = the name of the folder in which the shared drive (partition) will appear. In fact it will be /Data/Shares/NAS in my case
-fstype=cifs means I use the samba (MicroSoft) way of sharing partitions. Another choice would be NFS (Linux) but I find that hard to setup.
rw: I can read and write on the shared drive
credentials=/.credentials: "a form a safety" so not everyone can use the shared drive, partition or folder. Things is, I wrote the username and password in a hidden file .credentials so whenever the computer is running, safety is gone completely. Alternatively you can also forget about this item in the line and type your name and password every time. Safer, but not comfortable.
://192.168.2.227 is the network address of the computer and /folder is the folder which can be shared.
Make sure it can be shared or you won't be seeing it and you will get an error message the folder is not available.

For the other computer it is just the same, only with a different address.
When you don't get contact, switch off the firewall as a test and try it again. Does it work now then you need an open port in your network settings. I hope somebody else can help you with that. Maybe somebody can also explain how to setup NFS in a simple way. I am also interested in that.

Fargo
Posts: 896
Joined: 17 Sep 2013 14:40

Re: How do I share files between 2 solydk computers

Postby Fargo » 11 Nov 2016 22:23

OK so I found out that my firewall appears to be the problem. After several hours of cursing, I can now view files if I turn off the firewall. Hopefully turning off the firewall will be a permannt solution

Fargo
Posts: 896
Joined: 17 Sep 2013 14:40

Re: How do I share files between 2 solydk computers

Postby Fargo » 11 Nov 2016 22:54

Thanks Solyd, I didn't see your post earlier. I'll have to look it over again later. right now my head hurts and it just looks complicated. I found that I can turn off my firewall and it appears to work, so I will do that for now. But I know lost 3 hours of work trying to gain access to my network so right now I just need to work. I'll look at your solution again later. I really need to find something better than turning of my firewall all the time. I hate to curse linux but I don't remember windows being this difficult.

Fargo
Posts: 896
Joined: 17 Sep 2013 14:40

Re: How do I share files between 2 solydk computers

Postby Fargo » 11 Nov 2016 23:37

Turns out the firewall is not the issue either. I can view the file is there, but I can't get LibreOffice to open the smb file.

...This is rediculous. Is this KDE thing or a Linux thing that this is so difficult. I'd be happy to give up security for a little convenience here.

Fargo
Posts: 896
Joined: 17 Sep 2013 14:40

Re: How do I share files between 2 solydk computers

Postby Fargo » 11 Nov 2016 23:43

How do I find the IP address of a computer. Maybe I can access it directly.

SolydForEver
Posts: 339
Joined: 13 Oct 2014 05:25
Location: East part of The Netherlands

Re: How do I share files between 2 solydk computers

Postby SolydForEver » 12 Nov 2016 06:18

Fargo wrote:Turns out the firewall is not the issue either. I can view the file is there, but I can't get LibreOffice to open the smb file.

...This is rediculous. Is this KDE thing or a Linux thing that this is so difficult. I'd be happy to give up security for a little convenience here.
How are you connected now? How do you see the contents of your other computer in your file-manager?
Libreoffice is not able to open a file on an smb connected computer, it can only work with local files.
When you however mount the other computers partition it becomes a local drive and it should work.

User avatar
xendistar
Posts: 438
Joined: 08 Jun 2014 08:17
Location: Bournemouth, UK

Re: How do I share files between 2 solydk computers

Postby xendistar » 12 Nov 2016 15:31

Fargo wrote:How do I find the IP address of a computer. Maybe I can access it directly.
open a terminal and type

Code: Select all

sudo ifconfig
and your output will look like this

Code: Select all

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.100  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::5604:a6ff:fea5:124e  prefixlen 64  scopeid 0x20<link>
        ether 54:04:a6:a5:12:4e  txqueuelen 1000  (Ethernet)
        RX packets 3349326  bytes 4023530469 (3.7 GiB)
        RX errors 0  dropped 235  overruns 0  frame 0
        TX packets 1950940  bytes 214147723 (204.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 11  bytes 1987 (1.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 11  bytes 1987 (1.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

User avatar
ilu
Posts: 2044
Joined: 09 Oct 2013 12:45

Re: How do I share files between 2 solydk computers

Postby ilu » 13 Nov 2016 17:50

I did not need to change anything on the firewall for smb to work.
I'm using ssh, smb and gvfs, which means that on the target machine, which I want to access, either the ssh-server or samba needs to run. On SolydX smb is really easy to set up via gui. There's a "Samba Shares" applet under "Settings" which you need to use on the target machine. I don't know how to do this in KDE but I'm sure there's something in the settings too.
Afterwards you can just enter "smb://ip.add.res.s" into Thunar/Krusader and the target is mounted with gvfs. Here https://forums.solydxk.com/viewtopic.ph ... =20#p62796 is a detailed description on how to bookmark it in Thunar. Bookmarking in Krusader works the same way as any other bookmark. Never used Nautilus.


Return to “Networking”

Who is online

Users browsing this forum: No registered users and 3 guests