Warning: Undefined array key "HTTP_ACCEPT_LANGUAGE" in /home/u596154002/domains/usbusinessreviews.com/public_html/wp-includes/load.php on line 2057

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the rank-math domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/u596154002/domains/usbusinessreviews.com/public_html/wp-includes/functions.php on line 6114
How to share folders to your network from Linux - Best Business Review Site 2024

How to share folders to your network from Linux

[ad_1]

If you have several computers on your network, and you want to be able to share files and folders from your Linux operating system, the process isn’t nearly as hard as you might think. And although some Linux distributions strive to make this a point-and-click affair, they tend to fall short of the mark. 

That’s when you need to turn to Samba and the terminal window. But fear not, I’m going to show you how this is done in plain and simple terms. Once it’s finished, anyone on your LAN should be able to access those shared folders and files.

ZDNet Recommends


The best Linux Foundation classes


The best Linux Foundation classes


Want a good tech job? Then you need to know Linux and open-source software. One of the best ways to learn is via a Linux Foundation course.

To make this work, you’ll need a running instance of Linux and a user with sudo privileges. I’ll demonstrate the process with the user-friendly Ubuntu Desktop 22.04, but the process will be the same for most distributions (the only exception being the installation of Samba). 

With that said, let’s get to the sharing.

Installing Samba

The first thing we must do is install Samba. We’re going to do that from the command line, so log into your Linux desktop and open your terminal window application. With the terminal open, install Samba with:

sudo apt-get install samba -y

If you’re on a Fedora-based (or RHEL-based) desktop, that installation would be:

sudo dnf install samba -y

You might find that Samba is already installed by default. Either way, you’re ready to continue on.

Start and enable the Samba service with:

sudo systemctl enable --now smbd

Some Linux file managers allow you to share folders directly from within the GUI application. I’m going to share with you the manual process, on the off-chance your file manager doesn’t include that option.

Creating the share

Let’s say the folder you want to share is the Public folder in your home directory (so /home/USER/Public – where USER is your username). Back at the terminal window, we’re going to open the Samba configuration file with the command:

sudo nano /etc/samba.smb.conf

At the bottom of that file, paste the following:

[Public]
path = /home/USER/Public
browsable = yes
writable = yes
read only = no
force create mode = 0666
force directory mode = 0777

Where USER is your username.

Note: If you don’t want other users to be able to make changes to files and folders, set writeable to no. 

Save and close the file. Restart Samba with:

sudo systemctl restart smbd

At this point, your Samba share will be visible to the network, but won’t allow anyone to access it. Let’s fix that.

I’m going to assume you are the only user on your Linux machine. However, you don’t want to be handing out your login credentials to other users and you don’t want to allow anonymous access to the shared directory (as that could be a security issue). So, what do we do? Let’s create a new account on your machine that can be used by others to access the files and folders.

At the terminal window, create a user named guestshare with the command:

sudo adduser guestshare

Give that user a unique and strong password, name it Samba Guest (or something like that), and then just hit Enter on your keyboard for the remaining questions.

Next, we have to enable that user for Samba, so run the following two commands:

sudo smbpasswd -a guestshare
sudo smbpasswd -e guestshare

The first command above adds the user and the second command enables the user.

After entering the first command, you’ll be prompted to add a new password for Samba. You can use the same password you added when you created the guestshare account.

Any user on your network should now be able to access that folder using the guestshare credentials. 

And that’s all there is to create a shared folder on Linux from within your user home directory. Not only can users see the files and folders within, but they can also create and modify them.

[ad_2]

Source link

slot gacor slot gacor togel macau slot hoki bandar togel slot dana slot mahjong link slot link slot777 slot gampang maxwin slot hoki slot mahjong slot maxwin slot mpo slot777 slot toto slot toto situs toto toto slot situs toto situs toto situs toto situs toto slot88 toto slot slot gacor thailand slot bet receh situs toto situs toto slot toto slot situs toto situs toto situs toto situs togel macau toto slot slot demo slot pulsa slot pragmatic situs toto deposit dana 10k surga slot toto slot link situs toto situs toto slot situs toto situs toto slot777 slot gacor situs toto slot slot pulsa 10k toto togel situs toto slot situs toto slot gacor terpercaya slot dana slot gacor pay4d agen sbobet kedai168 kedai168 deposit pulsa situs toto slot pulsa situs toto slot pulsa situs toto situs toto situs toto slot dana toto slot situs toto slot pulsa toto slot situs toto slot pulsa situs toto situs toto situs toto toto slot toto slot slot toto akun pro maxwin situs toto slot gacor maxwin slot gacor maxwin situs toto slot slot depo 10k toto slot toto slot situs toto situs toto toto slot toto slot toto slot toto togel slot toto togel situs toto situs toto toto slot slot gacor slot gacor slot gacor situs toto situs toto cytotec toto slot situs toto situs toto toto slot situs toto situs toto slot gacor maxwin slot gacor maxwin link slot 10k slot gacor maxwin slot gacor slot pulsa situs slot 10k slot 10k toto slot toto slot situs toto situs toto situs toto bandar togel 4d toto slot toto slot situs toto