How to share files on a Linux network

This one goes to our colleague Claudio, who wants to learn how to configure a Linux network without using Samba. In an unfriendly comment, Claudio requests the creation of a GUI to be able to carry out a job that thousands (if not millions) of people have already done before and will continue to do it ... as much of this work is by console, and he doesn't like it Much prefer to create a GUI to be able to use it easily (at least Windows as he says) his internal network. Let's first go into this a little bit before the solution.

Business mode vs FOSS

Well, let's keep it simple from the beginning ... This is something that is always claimed in FOSS (Free and Open Source Software) projects, the lack of quality at work. I've always heard, but such game it is better to buy it from the company tal because it is better, such a program is BEST than its free version, such a system is BEST than another free. Let's see why this is:

About us tal lives of your software

If I am a company and my job is to sell software, that means I have to sell something extremely good for people to buy it, and therefore I have to pay to my developers to get it, and this is the starting point of this matter, free software and in some cases open source is developed by goodwill. People are not being paid to develop something for the rest. So if you tell me how are you software  work or whatever is better than its free version, well I tell you, probably, but there is a big problem in that:

It is made to make you dependent

This is like a drug, the more proprietary software you use, the less your ability to think and solve things autonomously. Let's just think about this for a second, do you know where you earn more, in sales or in maintenance? Well the answer to this is simple, no matter how expensive a program or system is, the profit in maintenance will always be greater than the profit in sale, because at the time of the problems, it does not matter the amount of money that must be invested to solve it because simply it can not change the infrastructure at that point.

Necessity is the mother of creation

An unfriendly way of requesting a GUI is not reason enough to do it, and at the same time, sorry if it hurts Claudio, but I have much more important things to do and projects to participate in to invest my time in solving your lack of autonomy and your mental passivity. But since you have asked, well we are going to explain to you why the GUIs do not exist yet for something that in Windows it's so simple.

When you share folders in windows you create security holes

Here more than one will tell me I'm wrong and etc etc ... but the truth is that when you use nmap To recognize a windows computer, probably if it is on a "trusted" network, it will be running a service on some port to be able to share files. This is not only dangerous, but it is so little known that many of the successful attacks arise because of sharing access through the network. But why does this arise? Well because the philosophy  Windows teaches you to say SI without knowing exactly what is happening. (Remember the dependency?) A very simple way to solve this would be to take good care of the equipment, but as the philosophy Windows isn't that, this is where the maintenance comes into play, and makes you have to need of someone to do things for you.

It is not necessary

If necessity is the mother of creation, without necessity, then there is nothing. This is something extremely simple to understand, if the people who use it (usually system administrators, or people using servers) do not need it, they will not create it. In very special cases (usually in free software) the creators put themselves a bit on the feet of the less experienced and decide help creating a GUI (Git has a GUI for those who want to try it out), but again, this is for pure goodwill of the creators, since the amount of work real is so big, and the developers so few, that those jobs are relegated to the free time from some kind-hearted developer. (Let's remember that nobody pays you to do it, and you still have family, work and responsibilities)

Bullying will never be the solution

Take this as advice and comment for all those who read it, I remember a lot a video that I once saw of an interview with Obama (someone I consider a great example of a person), where an angry man begins to criticize and insult him and he did not absolutely nothing. He did nothing, not because he couldn't, that is, he was the most powerful man on the planet at the time, but because he knew he shouldn't lower himself to that level. That is not and will not be a solution in this life, entering into an argument will never bring anything good, there are people who may believe that it does, but at least the intimidation and comments of an X will not move me. I only left it as a comment loose before starting the tutorial.

NFS

Network file system is an application-level protocol that provides information centralizedsynchronized in a network, it works both for Linux systems such as Windows and others (this due to being designed to application level). How we talk so centralized, it means that we are facing a Client / Server model solution. We have already touched on this superficially in another moment, but nothing else to emphasize a small detail.

Why is it important to have centralized information?

Someone else will say, «but I have important information on each type of machine I have, my work laptop, my home computer, etc etc ». The problem is the following, if an efficient backup model were followed, one would notice that creating and maintaining backups of many points is complicated, much easier (for all of us who use scripts and others) is to create a single point where the information arrives and from there begin to safeguard the data. In addition to having multiple versions at different points it not only makes it difficult to follow the information, but it also makes the job more complicated.

I'm not inventing gunpowder

For those who for a second believe that I have discovered this by trial and error, because nothing is further from the truth, I just use a little of what Google offers me and let's see what I found in the first search (I will assume that they are in Ubuntu those who use it, and I guess for Fedora the change should be minimal)

Google

Own. Christopher Diaz Riveros

Always follow what it says Official. This is perhaps one of the first steps to follow, and I put it in case anyone thinks that I knew something about NFS before writing this post.

TL; DR

Own. Christopher Diaz Riveros

Too long; don't read. Every time they see this acronym, they can be 100% sure that it is the "lazy" way of solving a problem, many will claim that how to know if it is in English, well, now they know it so that there can be no option to claim later 😉 I use the urban dicciontary a lot to understand many of these concepts.

Official Documentation (In Spanish !!)

Own. Christopher Diaz Riveros

Some kind-hearted soul took the job of translating for us this simple but complete page with everything necessary to install an NFS server on our network.

We will quickly see the steps to follow. I leave you the link for the curious who cannot use Google for X reasons to get to the same place.

Install the server and client

Now we are going to install by console what is needed in both places to use the shared files. On the server we install nfs-kernel-server and on the client nfs-common

Own. Christopher Diaz Riveros

Own. Christopher Diaz Riveros

Configure the server

NFS works through a configuration file located at /etc/exports. This file tells NFS which files to share and how to call them, in addition to having very good examples of how to use it by default, we will use the comfort to edit it thanks to the always reliable vim (those who are not comfortable with vim can use nano)

Own. Christopher Diaz Riveros

For this simple example I am telling exports that I want to share my folder workspace (The * indicates that I want to share all the content and without leaving space I write the permissions and options that best suit me, in this case rw for writing and reading)

Restart the server

If we have configured well, we need to restart the server (or start it if it is not active), it is not necessary every time there is a change, but I take the opportunity to make it clear, if you do not want to restart everything, a simple exportfs -ra resolve the issue.

Own. Christopher Diaz Riveros

The first line systemctl start nfs-kernel-server activates the server, the second one is just to verify that everything is ok (if it is not green, it is not ok).

Connect to server

Now we are going to connect our other equipment, for that we will use the comfort, and the command mount.

Own. Christopher Diaz Riveros

Here it is worth emphasizing that the IPs are assigned to your liking, I do not know if they will use DHCP or manual, but once they have the IP they can use it, they add : / path / of / your / folder and a place where you can mount the connection, in my case I created a folder called compartido.

Open your browser

Own. Christopher Diaz Riveros

Here they are both in version comfort as in version GUI. And I show you a bit of how I carry out my work at the institute, I always use virtual machines to work the information of the courses, (that's why they will see an OSX installed) and one for each language, so I can have controlled development environments and don't fill my Gentoo with unnecessary programs. Why ubuntu? well I like it more than Fedora and it's faster to create test machines that I can erase quickly too. As I said 🙂 everyone follows their philosophy and leave everything ready to use without much thought It is something that makes Ubuntu a lot easier for its users 🙂 (in addition to that I did my certification as a system administrator in Ubuntu (LFCS allows you to give it in the three great families of systems: Ubuntu (Debian), CentOS (Red Hat) and SUSE (SUSE) )), so it was a good way to remember apt-get y apt)

 Final Thoughts

I've already written a lot this time, but as you can see Claudio, it's only 4 steps (I hope you can do the Google one by yourself so as not to count), and guess what… you don't need a GUI for five commands. Sorry if I can not fulfill your desire to make the world GNU / Linux plus Windows, and prevent you from thinking a little and learning to googling stuff. And if you want to have permanent changes in your network and equipment through /etc/fstabWell, you will have to find it yourself.

For everyone else, please excuse me if I have been rude with this post, and although I have written it a bit moody (I must admit that nobody likes to have their work and effort questioned, and even less than called swagger) ... I really hope this can help more than one in their connection work. Thank you very much for getting here despite my clumsiness and mistakes, Greetings 🙂


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

34 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Miguel Mayol i Tur said

    I followed the steps for Manjaro (Arch) back in the day and it didn't work for me (I share with Samba) and the Thunar and Nautilus sharing plugins
    Regarding "windowizing", I think KISS is FLOSS inappropriate. In MS WOS there are also complicated things to do, and in neither case does it seem good for the user.
    Why not provide a script or meta-package that installs and configures NFS instead of copying and pasting 5 commands?
    Not so many dare to the first, much less to the second
    And if we add the plugin for NFS share in Thunar and / or Nautilus (or others) better for FLOSS and KISS, or not?
    And I'm not writing that it's your homework, but I'd be happy if someone would do it (for Samba too for the record) and use it as another tool to "convert" people to GNU / Linux teaching how easy it is to share a folder over NFS (or Samba) to use it from the Smart TV with Kodi

    1.    Octavio Sanchez said

      Why don't you try to do it yourself? In other words, if you think it is necessary and useful for FLOSS and KISS, then go ahead and collaborate with the community in that way.

      1.    Miguel Mayol i Tur said

        I lack that knowledge, programming.
        That on the other hand are trivial for those who have them and want to do so.
        And if you are a computer science student who wants to show off something like that on your CV, better.
        Regarding what did work for me, doing it with SAMBA I have already published a summarized tutorial in the Manjaro forum for those who can take advantage of it https://forum.manjaro.org/t/suggestion-samba-and-or-nfs-shares-and-plugins-easy-by-default/34169/4

  2.   RAFAEL PRESILLA said

    FOR A REGULAR OR BASIC CUSTOMER, HOW DO WE LEAVE THESE ACTIVE SERVICES BY DEFAULT?

    1.    ChrisADR said

      Hi Rafael, to be able to leave them by default with the start of the machine it is necessary to edit the / etc / fstab file so that it connects directly to the network, since that is a bit more specialized and I consider that you ask it in a business environment, there are other security considerations such as permissions and access names, access points, logs, among others. Greetings 🙂

  3.   Carlos Diaz said

    Well, I am starting in this world of linux, and I read everything you have published recently, I do not understand the context of your post and I mean the fight you have with Claudio, but I really value the time you spend writing them now share your knowledge, the least we can do who do not pay for it, is to read you with respect! Thank you very much and my sincere congratulations for such an excellent job.

    1.    ChrisADR said

      Hi Carlos, here is the context link

      https://blog.desdelinux.net/preferimos-la-linea-comandos-los-guis/#comment-225111

      It is not so much a fight, that would mean that I hope to continue with the subject, but after reading the context I hope you can understand the reason for my bad mood, or else maybe I have exaggerated the situation, in both cases it is not something that I intend to continue doing 🙂

      And thank you very much for your comment, it is actually because of comments like this that I am excited to write and maybe share a good time with all of you reading these posts 🙂 Greetings

  4.   Ivan said

    with the post everything is fine, what I do not »share» at all is that OBAMA IS A GOOD PERSON !!!!! one of the GREATEST SHOOTERS IN HISTORY TOGETHER WITH ISRAEL…. the sharing of a folder becomes a minor data after reading ESO.
    I've been using Linux for many years and I recommend it to my friends who use Linux, but please, the Obama thing is very strong.

    1.    ChrisADR said

      Hi Ivan, thanks for taking time to comment and share. Well, I consider Obama what I consider (and it is something very personal, you can share it or not, but it is worth clarifying here) for things like this:

      For those who have already read other posts of mine, both here and elsewhere, you will know that I am not a very "political" person in the sense of being aware of this, and actually that is one of the issues that I least care about. I like to try, but I have to do it when necessary. As Trump himself said shortly after becoming president ... "this is more difficult than I thought" ... we have already discussed that there are blacks, whites and shades, but I consider that a real way to recognize them is to know ALL the context ... and That is something that in political decisions is quite complicated due to the nature of much of the information.

      If I say that I consider him a good person, it is based on the positive leadership qualities that he has shown throughout his time in public office, I am not saying that he is perfect in every way, but he does have many qualities that are worthy of being imitated. I hope this has been able to make the subject a little clearer.
      regards

  5.   López said

    You in Taringa would go crazy.

    1.    ChrisADR said

      Or I would just leave it soon after 😛 regards 🙂

  6.   carlos zevallos said

    Samba for me meets all my requirements, I currently have it running in a business network with users and groups and with permissions to certain folders based on the user profile, I'm doing super well and I have windows and linux clients

    1.    ChrisADR said

      Well I have never really entered the world of windows-linux integration much, and it really makes me curious, but it's good that you like it and who knows, if you dare you could write an article about it 😉 greetings 🙂

    2.    Claudio said

      Carlos, samba is very good to share in a Windows-Linux network, but the issue is when you have a LAN network only with Linux. Samba does not work in the latter case and you have to carry out all the steps described by ChrisADR.

      1.    Bill said

        I have not implemented it, but as I read on the net:
        http://www.ite.educacion.es/formacion/materiales/85/cd/linux/m4/servidor_samba.html
        http://www.ite.educacion.es/formacion/materiales/85/cd/linux/m4/instalacin_y_configuracin_de_samba.html
        you can install a samba server in linux and therefore it is not necessary that there be any windows to use it on the network.

        1.    Bill said

          In other site: https://www.driverlandia.com/instalar-samba-para-compartir-carpetas-en-linux-debian/
          I see that since Win7 there may be problems with the password, but it would only affect win7,8,10 clients and not linux clients that are going to use a samba server with linux.

  7.   fernan said

    Hello:
    The opensuse yast has an nfs module, I have no idea about these issues, what's more, on my manjaro the other day I uninstalled nfs packages because I don't use them at all, every time I learn a little more I remove things from it to my gnome delicacy that I discover that they do not serve me at all, and little by little it consumes less RAM, I think that simple distros should have less pre-installed things, I realize that they carry many things that a beginner does not even know what they are for, sure that if the author of the post put me gentoo, he would still install 200 less packages and do everything I do with manjaro, until due to my ignorance gentoo broke of course.
    Finally, on this subject, we must indicate what Richard Staliman says many times free software does not imply that it should be free, I think that in today's society we are getting used to paying for a smartphone full of proprietary software that we do not know everything it does and instead we want free software that makes everything easy for us and is free, we must also get used to thinking a bit and searching in the case of this post I have no idea about nfs but I have seen that at least in opensuse there is a graphical module for this , I don't know if it will be good or bad.
    Greetings.

    1.    Miguel Mayol i Tur said

      Manjaro is great and not much less fast than Gentoo.
      But if you want to try Gentoo (too) I recommend Sabayon.
      It is a pre-installed and simple Gentoo, a little more or less what Manjaro to Arch is.

      1.    fernan said

        Hello:
        I have Sabayon in a virtual machine and there is much more difference between sabayon and gentoo than between manjaro and archlinux, sabayon uses entropy as the main package manager (equo on console and rigorous on graph) which is binary packages, it has portage but I don't know recommend using it a lot. Manjaro and arch have the same package manager, change that already in manjaro you have many installed and configurations and the repository, gentoo instead is to use portage to compile with options from the guente code, we are a huge difference with sabayon which gives you some packages that come from gentoo but with generic options.
        Greetings.

  8.   Ismael said

    Not long ago I was also dealing with these issues, when one is just starting out in Linux it is frustrating not to find quick solutions or applications that should have practical and not cumbersome procedures. I respect and thank developers who take their time, and like to do their job well, they taught me if one does something for free or it should not be done well because there it carries the personal stamp. But there are extremes. Linux is frowned upon because for the most part it is messy to do procedures and install functions and all by developers who, being able to improve their work, leave it adrift subject to long terminal commands. The other extreme is that there are users who go from "shell" who by idleness or mental pause want one to do everything for them.

    1.    ChrisADR said

      Hello Ismael, thanks for sharing and I just want to emphasize a couple of things ... UNIX uses a fairly clear philosophy in the development of programs "do one thing, and do it very well", because of this many programs only do one thing, and that is It is necessary to have to join several to be able to solve "complex" situations. I am not denying that there are quite a few programs that could be better, but at least at the bottom of it all, I have not experienced a lack of logic in the essential GNU programs or the kernel. It is unfortunate that such a bad idea is generated by the occasional poorly "thought out" program.

  9.   Claudio said

    THANKS Friend ChrisADR, obviously you know a lot about yours, I congratulate you and I apologize if I was a bit harsh in my previous comment, in the terminal or gui preference output. But with this post, you have just confirmed what I keep claiming in linux, an easy way to share folders on a Linux LAN Network and as you well describe in this very good post, it is very tedious for me as a user, having to do so many steps in a terminal to be able to share the folders on a Linux lan network. I repeat, thanks for this post and it will surely be useful to many, not to me, unfortunately. I expect much more from linux. For now, I will have to continue using Guindous for my LAN networks. And of course, on my notebook, I continue with my dear MX Linux.

    1.    Ravenman said

      A very simple solution that I often resort to to achieve what you want is to make use of https://es.wikipedia.org/wiki/Secure_Shell_Filesystem y https://es.wikipedia.org/wiki/Files_transferred_over_shell_protocol.

    2.    ChrisADR said

      Hello Claudio 🙂 Well thank you very much for giving you the time to share, and thanks for your apologies, excuse me too if I have been rude somewhere. Well, although what you are telling me is a shame, I have a proposal for you; Since it could be a useful function and that more than one seems to be interested, we could ask a project to implement it as an improvement proposal 🙂 I personally do not have the time or the facility to make a whole program from scratch, but maybe our colleagues Nautilus (GNOME) or Dolphin (Plasma) can have it on their to-do list until some other developer can buy the time, and probably do it a lot faster than me :)

      If you like the idea, we can see together how and where to publish the improvement proposal, who knows and maybe something similar is already being cooked somewhere 🙂 Greetings

  10.   Tedel said

    I installed Syncthing and had no more problems. I contribute it here as an alternative.

  11.   anonymous said

    Hi, I admit that since ChrisADR walks on this blog I am waiting for the next one, you just learn from it, thanks for that, in another order and continuing with one of the points of the post.

    The context is that I have to copy some files from the ATMs and pass it to a server (GNU / LINUX), I am working on a backup system, but I have a condition I am working with ATMs (ATMs) and I cannot open any ports, i also don't have windows network file transfer service, i can't use ftp either. I just don't have the tools for that, it is too specific a service and there is no tool for it.

    But I know that there is something like SSH and SCP and that together they are very secure tools up to there fine, but how do I install SSH in windows? and not exactly a program that allows me to use the protocol, I need something more versatile, I need something with a CLI interface, obviously I don't know anything, while researching I discovered a python library that allows you to use different network protocols and doing some research on how it works, now I have a functional system, where I don't use samba or SFN but I can transfer files using a good secure protocol.

    Where I want to get with this is that with knowing python and knowing that something exists (ssh), finish the given task, if I were someone else I would have said, that is not possible, I need to enable ports or activate windows features or that there is no tool that allows me that.

    And it does not go into the subject, but if you ask me why I prefer CLI over GUI, simply the CLI is reusable and that gives it too much greater power over the graph. A CLI tool can be used by other programs (wrapper) the graph is only intended for the user.

    1.    ChrisADR said

      Hello 🙂 Well, thank you very much for what you say, and thank you for sharing your experience.
      As you mentioned, the CLIs are like magic behind the scenes, not always recognized, but without them much of what can be seen (GUI) would not work at all.

      regards

  12.   Arturo J. Ducoing O. said

    Do not despair, remember that the Windows user is quite special and it is not until this system ruins their existence that they sometimes begin to question its usefulness, and even then they return to use it.

    Windows users are legion, and some more demonized than others, and they are not used to reading the documentation, that's why when you bring them to the GNU / Linux environment they suffer so much.

    I use your information a lot, thanks for sharing.

  13.   claudio said

    eurekaaaa, I finally found what I needed, "open source is developed by good will." That is clear and very commendable, and it is seen that there is someone who had the same need as me and developed (or shared) I could not read everything, a solution that I demanded so much. And yes, of good will, "shared" and I am very grateful. But as the introduction to this post says, "you have to charge for good solutions", obviously I will not charge, but I am not going to put the link where I found the solution, because my time is worth a lot, I do not charge but ... it took time to find. I can only comment to those who are interested and have the same concern, that you can find it in yuotube. 🙂

    1.    Rams Castaway said

      How easy it is to "demand" a solution and have someone take the time to explain it to you in great detail without charging you anything. ChrisADR (who I don't know) didn't charge a penny for that, but you selfishly claim to have found a resource that someone else, non-profit, shared, and you refuse to give the link (by the way, no need). I don't know who you are either, but I do realize that your attitude leaves much to be desired. Remember that those "good solutions (that) must be charged" were not made by you and the person who made them, did not charge either. So that only turns you into a parasite (type of predation. A close relationship in which one of the participants (the parasite or host) depends on the other (host or host) and gets some benefit.) Note: I put you the meaning so that you don't have the trouble of looking for it, since your time is worth a lot.

    2.    lizard said

      Well obviously you must have some evil in your head, since you benefit every day from the information that people put here willingly and when "according to" you get something worthwhile you refuse to share it, to avoid this your account goes To be canceled, your IP is restricted and you will probably have to do constant checks so that you cannot re-enter FromLinux because if this community has something, it is that it is for people, not for parasites.

  14.   Ernesto Iglesias said

    First of all thanks for the post, it has been very useful, although not as simple as they wanted to paint it, much more searching. However, I find it extremely offensive and out of place all the introduction and comments that have nothing to do with the problem, if not the author did not want to respond better, someone else would answer it and did not have to call it a Good Samaritan after charging the information with offenses . Anyway, thanks. Regarding whether they charge or not, or if they do everything "for the love of others" is not a reason to do things "by halves" and "Google someone else", because not everyone has to know everything or "copy and sticking »codes means using your head or understanding anything. Greetings to all and good morning

  15.   leonidas83glx said

    What I want is to mount a folder on an NTFS hard drive that I have inherited from Windows. I can access and write to it from my main machine but I can't mount it on the laptop having installed both the NFS server on the main machine and the client on the laptop. I tried everything but there is no case.

  16.   I do not tell you said

    Post crap that doesn't do what it promises.