Skip to content

Commit

Permalink
samba_file_share.md (#2206)
Browse files Browse the repository at this point in the history
Grammar check
  • Loading branch information
gannazhyrnova authored Jul 29, 2024
1 parent c03854d commit 80f08dd
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions docs/guides/file_sharing/samba_file_share.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Samba Windows File Sharing
author: Neel Chauhan
contributors: Steven Spencer
contributors: Steven Spencer, Ganna Zhyrnova
tested_with: 9.4
tags:
- file transfer
Expand All @@ -10,7 +10,7 @@ tags:

## Introduction

If you have ever dealt with Windows systems chances are you are aware of SMB (Server Message Block) for file sharing. If you are a seasoned Linux administrator chances are that you have heard of Samba but if you have not, [Samba](https://www.samba.org/) is the de facto open-source implementation of SMB to enable file sharing and Active Directory access from Linux machines to Windows networks.
If you have ever dealt with Windows systems, you are likely aware of SMB (Server Message Block) for file sharing. If you are a seasoned Linux administrator, chances are that you have heard of Samba, but if you have not, [Samba](https://www.samba.org/) is the de facto open-source implementation of SMB to enable file sharing and Active Directory access from Linux machines to Windows networks.

## Installation

Expand All @@ -22,13 +22,13 @@ dnf install -y samba

## Setting up a share

First make a directory you want to share with Windows clients:
First, make a directory you want to share with Windows clients:

```bash
mkdir /var/store
```

Next set the SELinux labels on the `/var/store` directory:
Next, set the SELinux labels on the `/var/store` directory:

```bash
semanage fcontext -a -t samba_share_t "/var/store(/.*)?"
Expand All @@ -43,7 +43,7 @@ Now configure Samba:
vi /etc/samba/smb.conf
```

In the `smb.conf` file navigate to the bottom and insert the following:
In the `smb.conf` file, navigate to the bottom and insert the following:

```bash
[Share]
Expand All @@ -58,11 +58,11 @@ If you are unaware of the options above, they are:

* `path` is the directory we are sharing. Set this to your respective directory (`/var/store` in our case).
* `browseable` is to allow clients to browsing access. If you want to disallow browsing set this to `no`.
* `writable` is to allow clients writing access. If you want to allow write access set this to `yes`.
* `read only` is to mark the share as read-only. If you want to allow write or execute access set this to `no`.
* `guest ok` is to allow non-authenticated users access to our share. If you want to deny guests set this to `no`.
* `writable` is to allow clients writing access. If you want to allow write access, set this to `yes`.
* `read only` marks the share as read-only. If you want to allow write or execute access, set this to `no`.
* `guest ok` is to allow non-authenticated users access to our share. If you want to deny guests, set this to `no`.

To test the configuration you can run:
o test the configuration, you can run the following:

```bash
testparm
Expand Down Expand Up @@ -90,12 +90,12 @@ You can access the Samba share using the following URI (Note: replace `SERVER_IP
* Windows: `\\SERVER_IP`
* Linux or Mac: `smb://SERVER_IP`

`SERVER_IP` on the author's home network is `172.20.0.100` so while the instructions vary based on operating system, the author will access the new share from their Fedora 40 notebook:
`SERVER_IP` on the author's home network is `172.20.0.100`, so while the instructions vary based on an operating system, the author will access the new share from their Fedora 40 notebook:

![Fedora 40 Nautilus showing our Samba Share](../images/samba_nautilus.png)

All files accessible on the server are also available on client machines.

## Conclusion

While SMB has a reputation of being Microsoft-centric, SMB is actually an industry standard and your Samba share can be accessed from Linux, Mac, BSD and even mobile devices. So congratulations, you are sharing your server's files now!
While SMB has a reputation for being Microsoft-centric, it is an industry standard, and your Samba share can be accessed from Linux, Mac, BSD, and even mobile devices. So congratulations, you are sharing your server's files now!

0 comments on commit 80f08dd

Please sign in to comment.